Skip to content

Commit

Permalink
remove auth mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
oliveromahony committed Nov 14, 2024
1 parent 49c4e7b commit de96a25
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions internal/config/mapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
10 changes: 5 additions & 5 deletions internal/config/mapper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func TestFromCommandProto(t *testing.T) {
},
expected: &Command{
Server: getAgentConfig().Command.Server,
Auth: &AuthConfig{Token: ""},
Auth: nil,
TLS: getAgentConfig().Command.TLS,
},
},
Expand All @@ -54,7 +54,7 @@ func TestFromCommandProto(t *testing.T) {
},
expected: &Command{
Server: nil,
Auth: &AuthConfig{Token: ""},
Auth: nil,
TLS: getAgentConfig().Command.TLS,
},
},
Expand All @@ -76,7 +76,7 @@ func TestFromCommandProto(t *testing.T) {
},
expected: &Command{
Server: getAgentConfig().Command.Server,
Auth: &AuthConfig{Token: ""},
Auth: nil,
TLS: getAgentConfig().Command.TLS,
},
},
Expand All @@ -92,7 +92,7 @@ func TestFromCommandProto(t *testing.T) {
},
expected: &Command{
Server: getAgentConfig().Command.Server,
Auth: &AuthConfig{Token: ""},
Auth: nil,
TLS: nil,
},
},
Expand All @@ -101,7 +101,7 @@ func TestFromCommandProto(t *testing.T) {
protoConfig: &mpi.CommandServer{},
expected: &Command{
Server: nil,
Auth: &AuthConfig{Token: ""},
Auth: nil,
TLS: nil,
},
},
Expand Down

0 comments on commit de96a25

Please sign in to comment.