Merge pull request #110876 from zhoumingcheng/master-unit-v6

add unit test coverage for pkg/util/slice
This commit is contained in:
Kubernetes Prow Robot
2022-07-05 15:59:20 -07:00
committed by GitHub

View File

@@ -78,6 +78,11 @@ func TestContainsString(t *testing.T) {
if !ContainsString(src, "ee", 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) {