diff --git a/internal/config/mapper.go b/internal/config/mapper.go index e3d3e4129..c9e85e642 100644 --- a/internal/config/mapper.go +++ b/internal/config/mapper.go @@ -27,8 +27,8 @@ func FromCommandProto(config *mpi.CommandServer) *Command { } else { cmd.Server = nil } - // Map AuthSettings to AuthConfig - cmd.Auth = &AuthConfig{} + // Set Auth to be nil + cmd.Auth = nil // Map TLSSettings to TLSConfig if config.GetTls() != nil { diff --git a/internal/config/mapper_test.go b/internal/config/mapper_test.go index 49bcea800..7b6e85798 100644 --- a/internal/config/mapper_test.go +++ b/internal/config/mapper_test.go @@ -36,7 +36,7 @@ func TestFromCommandProto(t *testing.T) { }, expected: &Command{ Server: getAgentConfig().Command.Server, - Auth: &AuthConfig{Token: ""}, + Auth: nil, TLS: getAgentConfig().Command.TLS, }, }, @@ -54,7 +54,7 @@ func TestFromCommandProto(t *testing.T) { }, expected: &Command{ Server: nil, - Auth: &AuthConfig{Token: ""}, + Auth: nil, TLS: getAgentConfig().Command.TLS, }, }, @@ -76,7 +76,7 @@ func TestFromCommandProto(t *testing.T) { }, expected: &Command{ Server: getAgentConfig().Command.Server, - Auth: &AuthConfig{Token: ""}, + Auth: nil, TLS: getAgentConfig().Command.TLS, }, }, @@ -92,7 +92,7 @@ func TestFromCommandProto(t *testing.T) { }, expected: &Command{ Server: getAgentConfig().Command.Server, - Auth: &AuthConfig{Token: ""}, + Auth: nil, TLS: nil, }, }, @@ -101,7 +101,7 @@ func TestFromCommandProto(t *testing.T) { protoConfig: &mpi.CommandServer{}, expected: &Command{ Server: nil, - Auth: &AuthConfig{Token: ""}, + Auth: nil, TLS: nil, }, },