Add multi-violation CEL integration tests for OIDCConfigRef and AuthzConfigRef#4309
Add multi-violation CEL integration tests for OIDCConfigRef and AuthzConfigRef#4309
Conversation
…ConfigRef Test that the API server surfaces multiple CEL violations simultaneously: - OIDCConfigRef: type=configMap with only inline set triggers both the missing-configMap and extra-inline rules at once - OIDCConfigRef: type=inline with inline+kubernetes set triggers the kubernetes-not-allowed rule - AuthzConfigRef: type=configMap with only inline set triggers both the missing-configMap and extra-inline rules at once Co-authored-by: Chris Burns <ChrisJBurns@users.noreply.github.com>
|
@claude please update the pr description |
|
Claude finished @ChrisJBurns's task in 1m 18s —— View job Updating PR Description
The Summary
Type of change
Test plan
Changes
Does this introduce a user-facing change?No Generated with Claude Code |
jhrozek
left a comment
There was a problem hiding this comment.
Reviewed the full changeset (49 lines, single test file). Tests are technically correct — all assertions match actual CEL rule behavior and will pass. The And(ContainSubstring(...)) pattern is the right Gomega idiom for order-independent multi-message checks, resource names are unique, and the file follows existing conventions.
Minor observations (non-blocking):
- The second OIDC test (
oidc-inline-with-k8s, line 183) only triggers one CEL rule (the kubernetes rule), so it's a single-violation test in the multi-violation context — not incorrect, just mislabeled organizationally. - The reverse AuthzConfigRef multi-violation direction (
type=inlinewith onlyconfigMapset) isn't covered, but this is additive.
Neither is worth blocking on. LGTM.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4309 +/- ##
=======================================
Coverage 68.77% 68.77%
=======================================
Files 473 473
Lines 47919 47919
=======================================
+ Hits 32955 32958 +3
+ Misses 12299 12297 -2
+ Partials 2665 2664 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
Adds some extra test cases to the CEL scenarios