fix(tests): result != expected should fail a test
Related Issue(s)
This is required for https://github.com/kyverno/kyverno/pull/12117 to be merged.
Description
This PR fixes two tests that rely on wrong Kyverno behaviour.
In the case of allowed-label-changes:
- test updating a non
breakglasslabel should fail, but it succeeds. Prior to https://github.com/kyverno/kyverno/pull/12117 this is considered aPassresult.
In the case of prepend-image-registry:
- I'm not entirely sure what the fail case for a mutating policy is, apart from the webhook being unavailable. We could probably fake it with a
resource.operationset to something other thanCREATEorUPDATE, but I've decided to delete theresult: failtests, and leave the tests checking if mutation happened correctly.
Checklist
-
I have read the policy contribution guidelines. -
I have added test manifests and resources covering both positive and negative tests that prove this policy works as intended. (with the caveat of the mutating policy) -
I have added the artifacthub-pkg.yml file and have verified it is complete and correct.