Skip to content

Commit

Permalink
add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
cr7258 committed Aug 26, 2023
1 parent 9445b85 commit c3b4ea7
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pkg/controller/elasticsearch/nodespec/podspec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -564,3 +564,16 @@ func Test_enableLog4JFormatMsgNoLookups(t *testing.T) {
})
}
}

func Test_getScriptsConfigMapContent(t *testing.T) {
cm := &corev1.ConfigMap{
Data: map[string]string{
PreStopHookScriptConfigKey: "value1#",
initcontainer.PrepareFsScriptConfigKey: "value2#",
ReadinessProbeScriptConfigKey: "value3#",
initcontainer.SuspendScriptConfigKey: "value4#",
initcontainer.SuspendedHostsFile: "value5#",
},
}
assert.Equal(t, "value1#value2#value3#value4#", getScriptsConfigMapContent(cm))
}

0 comments on commit c3b4ea7

Please sign in to comment.