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 25, 2023
1 parent 9445b85 commit 553aab1
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{
"pre-stop-hook-script.sh": "value1#",
"prepare-fs.sh": "value2#",
"readiness-probe-script.sh": "value3#",
"suspend.sh": "value4#",
"suspended_pods.txt": "value5#",
},
}
assert.Equal(t, "value1#value2#value3#value4#", getScriptsConfigMapContent(cm))
}

0 comments on commit 553aab1

Please sign in to comment.