Summary
The current PolicyException validation tests in api/policies.kyverno.io/v1beta1/policy_exception_test.go leave some validation paths untested.
Specifically:
TestCELPolicyException_GetKind contains duplicate subtest names (not set).
TestCELPolicyExceptionSpec_Validate includes a // TODO: Add test cases. comment.
- Validation cases for:
- a policy reference missing both
name and kind
- multiple invalid policy references with indexed field paths
are currently not covered.
Proposed change
- Rename the duplicate subtest for better test output.
- Add the missing validation test cases.
- Remove the existing TODO after adding the coverage.
Summary
The current
PolicyExceptionvalidation tests inapi/policies.kyverno.io/v1beta1/policy_exception_test.goleave some validation paths untested.Specifically:
TestCELPolicyException_GetKindcontains duplicate subtest names (not set).TestCELPolicyExceptionSpec_Validateincludes a// TODO: Add test cases.comment.nameandkindare currently not covered.
Proposed change