mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
add unit test coverage for pkg/util/slice
Signed-off-by: zhoumingcheng <zhoumingcheng@beyondcent.com>
This commit is contained in:
parent
b2ed6ca64f
commit
509c487fe8
@ -78,6 +78,11 @@ func TestContainsString(t *testing.T) {
|
|||||||
if !ContainsString(src, "ee", modifier) {
|
if !ContainsString(src, "ee", modifier) {
|
||||||
t.Errorf("ContainsString didn't find the string by modifier")
|
t.Errorf("ContainsString didn't find the string by modifier")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
src = make([]string, 0)
|
||||||
|
if ContainsString(src, "", nil) {
|
||||||
|
t.Errorf("The result returned is not the expected result")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestRemoveString(t *testing.T) {
|
func TestRemoveString(t *testing.T) {
|
||||||
|
Loading…
Reference in New Issue
Block a user