diff --git a/agent/agent_test.go b/agent/agent_test.go index 108f970f9fec..a2e27feaf4fd 100644 --- a/agent/agent_test.go +++ b/agent/agent_test.go @@ -4212,7 +4212,7 @@ func TestAgent_ReloadConfig_EnableDebug(t *testing.T) { }, ) require.NoError(t, a.reloadConfigInternal(c)) - require.Equal(t, true, a.config.EnableDebug.Load()) + require.Equal(t, true, a.enableDebug.Load()) c = TestConfig( testutil.Logger(t), @@ -4223,7 +4223,7 @@ func TestAgent_ReloadConfig_EnableDebug(t *testing.T) { }, ) require.NoError(t, a.reloadConfigInternal(c)) - require.Equal(t, false, a.config.EnableDebug.Load()) + require.Equal(t, false, a.enableDebug.Load()) } func TestAgent_consulConfig_AutoEncryptAllowTLS(t *testing.T) { diff --git a/agent/config/builder.go b/agent/config/builder.go index 0f87ff51a578..32bc23078d35 100644 --- a/agent/config/builder.go +++ b/agent/config/builder.go @@ -1010,7 +1010,7 @@ func (b *builder) build() (rt RuntimeConfig, err error) { DiscoveryMaxStale: b.durationVal("discovery_max_stale", c.DiscoveryMaxStale), EnableAgentTLSForChecks: boolVal(c.EnableAgentTLSForChecks), EnableCentralServiceConfig: boolVal(c.EnableCentralServiceConfig), - EnableDebug: c.EnableDebug, + EnableDebug: *c.EnableDebug, EnableRemoteScriptChecks: enableRemoteScriptChecks, EnableLocalScriptChecks: enableLocalScriptChecks, EncryptKey: stringVal(c.EncryptKey),