test: fix resource exists check
@@ -440,11 +440,9 @@ func (e *e2e) exists(args ...string) bool {
output, err := command.New(
e.kubectlPath, append([]string{"get"}, args...)...,
).RunSilent()
- if err != nil {
+ e.Nil(err)
return !strings.Contains(output.Error(), "not found")
}
- return true
-}
func (e *e2e) getSeccompPolicyID(profile string) string {
ns := e.getCurrentContextNamespace(defaultNamespace)
