mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
Address field name feedback
This commit is contained in:
@@ -110,14 +110,13 @@ consul {
|
||||
vault {
|
||||
address = "127.0.0.1:9500"
|
||||
allow_unauthenticated = true
|
||||
child_token_ttl = "1s"
|
||||
task_token_ttl = "1s"
|
||||
enabled = false
|
||||
periodic_token = "12345"
|
||||
token = "12345"
|
||||
tls_ca_file = "/path/to/ca/file"
|
||||
tls_ca_path = "/path/to/ca"
|
||||
tls_cert_file = "/path/to/cert/file"
|
||||
tls_key_file = "/path/to/key/file"
|
||||
tls_server_name = "foobar"
|
||||
tls_skip_verify = true
|
||||
token_role_name = "roleFoo"
|
||||
}
|
||||
|
||||
@@ -655,16 +655,15 @@ func parseVaultConfig(result **config.VaultConfig, list *ast.ObjectList) error {
|
||||
valid := []string{
|
||||
"address",
|
||||
"allow_unauthenticated",
|
||||
"child_token_ttl",
|
||||
"enabled",
|
||||
"periodic_token",
|
||||
"task_token_ttl",
|
||||
"tls_ca_file",
|
||||
"tls_ca_path",
|
||||
"tls_cert_file",
|
||||
"tls_key_file",
|
||||
"tls_server_name",
|
||||
"tls_skip_verify",
|
||||
"token_role_name",
|
||||
"token",
|
||||
}
|
||||
|
||||
if err := checkHCLKeys(listVal, valid); err != nil {
|
||||
|
||||
@@ -125,16 +125,15 @@ func TestConfig_Parse(t *testing.T) {
|
||||
Vault: &config.VaultConfig{
|
||||
Addr: "127.0.0.1:9500",
|
||||
AllowUnauthenticated: true,
|
||||
ChildTokenTTL: "1s",
|
||||
Enabled: false,
|
||||
PeriodicToken: "12345",
|
||||
TLSCaFile: "/path/to/ca/file",
|
||||
TLSCaPath: "/path/to/ca",
|
||||
TLSCertFile: "/path/to/cert/file",
|
||||
TLSKeyFile: "/path/to/key/file",
|
||||
TLSServerName: "foobar",
|
||||
TLSSkipVerify: true,
|
||||
TokenRoleName: "roleFoo",
|
||||
TaskTokenTTL: "1s",
|
||||
Token: "12345",
|
||||
},
|
||||
HTTPAPIResponseHeaders: map[string]string{
|
||||
"Access-Control-Allow-Origin": "*",
|
||||
|
||||
@@ -96,10 +96,9 @@ func TestConfig_Merge(t *testing.T) {
|
||||
"Access-Control-Allow-Origin": "*",
|
||||
},
|
||||
Vault: &config.VaultConfig{
|
||||
TokenRoleName: "1",
|
||||
PeriodicToken: "1",
|
||||
Token: "1",
|
||||
AllowUnauthenticated: false,
|
||||
ChildTokenTTL: "1",
|
||||
TaskTokenTTL: "1",
|
||||
Addr: "1",
|
||||
TLSCaFile: "1",
|
||||
TLSCaPath: "1",
|
||||
@@ -223,10 +222,9 @@ func TestConfig_Merge(t *testing.T) {
|
||||
"Access-Control-Allow-Methods": "GET, POST, OPTIONS",
|
||||
},
|
||||
Vault: &config.VaultConfig{
|
||||
TokenRoleName: "2",
|
||||
PeriodicToken: "2",
|
||||
Token: "2",
|
||||
AllowUnauthenticated: true,
|
||||
ChildTokenTTL: "2",
|
||||
TaskTokenTTL: "2",
|
||||
Addr: "2",
|
||||
TLSCaFile: "2",
|
||||
TLSCaPath: "2",
|
||||
|
||||
Reference in New Issue
Block a user