Skip to content

Commit

Permalink
fix params
Browse files Browse the repository at this point in the history
  • Loading branch information
nammn committed Jun 27, 2024
1 parent e124abc commit 5f3362a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions api/v1/mongodbcommunity_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,10 @@ type LogLevel string

const (
LogLevelDebug LogLevel = "DEBUG"
LogLevelInfo string = "INFO"
LogLevelWarn string = "WARN"
LogLevelError string = "ERROR"
LogLevelFatal string = "FATAL"
LogLevelInfo LogLevel = "INFO"
LogLevelWarn LogLevel = "WARN"
LogLevelError LogLevel = "ERROR"
LogLevelFatal LogLevel = "FATAL"
)

type AgentConfiguration struct {
Expand Down
4 changes: 2 additions & 2 deletions controllers/construct/build_statefulset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,14 @@ func TestMongod_Container(t *testing.T) {
}

func TestMongoDBAgentCommand(t *testing.T) {
cmd := AutomationAgentCommand(false, "INFO", "testfile", 24)
cmd := AutomationAgentCommand(false, mdbv1.LogLevelInfo, "testfile", 24)
baseCmd := MongodbUserCommand + BaseAgentCommand() + " -cluster=" + clusterFilePath + automationAgentOptions
assert.Len(t, cmd, 3)
assert.Equal(t, cmd[0], "/bin/bash")
assert.Equal(t, cmd[1], "-c")
assert.Equal(t, cmd[2], baseCmd+" -logFile testfile -logLevel INFO -maxLogFileDurationHrs 24")

cmd = AutomationAgentCommand(false, "INFO", "/dev/stdout", 24)
cmd = AutomationAgentCommand(false, mdbv1.LogLevelInfo, "/dev/stdout", 24)
assert.Len(t, cmd, 3)
assert.Equal(t, cmd[0], "/bin/bash")
assert.Equal(t, cmd[1], "-c")
Expand Down
2 changes: 1 addition & 1 deletion controllers/construct/mongodbstatefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ func BuildMongoDBReplicaSetStatefulSetModificationFunction(mdb MongoDBStatefulSe

agentLogLevel := mdbv1.LogLevelInfo
if mdb.GetAgentLogLevel() != "" {
agentLogLevel = string(mdb.GetAgentLogLevel())
agentLogLevel = mdb.GetAgentLogLevel()
}

agentLogFile := automationconfig.DefaultAgentLogFile
Expand Down

0 comments on commit 5f3362a

Please sign in to comment.