diff --git a/command/agent/config_parse_test.go b/command/agent/config_parse_test.go index d2567c7fc..35edc6dbb 100644 --- a/command/agent/config_parse_test.go +++ b/command/agent/config_parse_test.go @@ -213,6 +213,7 @@ var basicConfig = &Config{ AutoAdvertise: &trueValue, ChecksUseAdvertise: &trueValue, Timeout: 5 * time.Second, + TimeoutHCL: "5s", }, Vault: &config.VaultConfig{ Addr: "127.0.0.1:9500", @@ -420,7 +421,10 @@ func TestConfig_ParseMerge(t *testing.T) { actual, err := ParseConfigFile(path) require.NoError(t, err) - require.Equal(t, basicConfig.Client, actual.Client) + // The Vault connection retry interval is an internal only configuration + // option, and therefore needs to be added here to ensure the test passes. + actual.Vault.ConnectionRetryIntv = config.DefaultVaultConnectRetryIntv + require.Equal(t, basicConfig, actual) oldDefault := &Config{ Consul: config.DefaultConsulConfig(), @@ -431,8 +435,7 @@ func TestConfig_ParseMerge(t *testing.T) { Audit: &config.AuditConfig{}, } merged := oldDefault.Merge(actual) - require.Equal(t, basicConfig.Client, merged.Client) - + require.Equal(t, basicConfig, merged) } func TestConfig_Parse(t *testing.T) { diff --git a/command/agent/testdata/basic.hcl b/command/agent/testdata/basic.hcl index 27754b957..1f44fcf00 100644 --- a/command/agent/testdata/basic.hcl +++ b/command/agent/testdata/basic.hcl @@ -226,6 +226,7 @@ consul { client_auto_join = true auto_advertise = true checks_use_advertise = true + timeout = "5s" } vault { diff --git a/command/agent/testdata/basic.json b/command/agent/testdata/basic.json index 406e314a9..71a653ca1 100644 --- a/command/agent/testdata/basic.json +++ b/command/agent/testdata/basic.json @@ -159,6 +159,7 @@ "server_serf_check_name": "nomad-server-serf-health-check", "server_service_name": "nomad", "ssl": true, + "timeout": "5s", "token": "token1", "verify_ssl": true }