test, Fail on namespace creation failure
Currently if namespace creation returns AlreadyExist error then
test failure is skipped. Since this can cause scenarios where an
existing namespace has leftovers that can affect later tests,
Failing namespace creation on any non-nil error.
@@ -260,7 +260,7 @@ func createNamespaces() {
},
}
_, err = virtCli.CoreV1().Namespaces().Create(context.Background(), ns, metav1.CreateOptions{})
- if !errors.IsAlreadyExists(err) {
+ if err != nil {
util.PanicOnError(err)
}
}
