Commit 45a4a78
fix test: expect CRD validation to reject empty subjects in ClusterRoleBinding
With the upgraded envtest (K8s 1.31), CRD CEL validation rules are now
properly enforced. Creating a ClusterPermission with an empty Subjects
array in ClusterRoleBinding is correctly rejected by the XValidation
rule defined in clusterpermission_types.go. Update the test assertion
from Should(Succeed()) to ShouldNot(Succeed()).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: xuezhaojun <zxue@redhat.com>1 parent 03bfc51 commit 45a4a78
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
672 | 672 | | |
673 | 673 | | |
674 | 674 | | |
675 | | - | |
| 675 | + | |
676 | 676 | | |
677 | 677 | | |
678 | 678 | | |
| |||
690 | 690 | | |
691 | 691 | | |
692 | 692 | | |
693 | | - | |
| 693 | + | |
694 | 694 | | |
695 | 695 | | |
696 | 696 | | |
| |||
0 commit comments