Port kuttl 1-113 validate controller role test to Ginkgo - #1214
Conversation
Signed-off-by: NAVEENA S <nas@redhat.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
📝 WalkthroughSummary by CodeRabbit
WalkthroughAdds a sequential Ginkgo E2E test that verifies application-controller ChangesRBAC aggregation validation
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
/test v4.19-ci-index-gitops-operator-bundle |
|
/retest |
|
/test v4.14-kuttl-parallel |
|
/test v4.14-kuttl-parallel |
| Expect(k8sClient.Create(ctx, aggregateClusterRole)).To(Succeed()) | ||
| defer func() { | ||
| Expect(client.IgnoreNotFound(k8sClient.Delete(ctx, aggregateClusterRole))).To(Succeed()) | ||
| Eventually(aggregateClusterRole).Should(k8sFixture.NotExistByName()) |
There was a problem hiding this comment.
IMO this should presume the Expect(client.IgnoreNotFound(k8sClient.Delete(ctx, aggregateClusterRole))).To(Succeed()) caused the role to be gone, or retry and wait until it is.
olivergondza
left a comment
There was a problem hiding this comment.
I have left few comments. The PR looks good overall.
|
/lgtm |
Log expected vs actual policy rules on mismatch, and rely on Delete success for ClusterRole cleanup instead of an extra NotExist wait. Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: NAVEENA S <nas@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
f751a44 to
925046d
Compare
|
/test v4.19-kuttl-sequential |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: svghadi The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
8e26a0b
into
redhat-developer:master
What type of PR is this?
/kind enhancement
What does this PR do / why we need it:
Ports the kuttl sequential test 1-113_validate_controller_role from operator-e2e to a Ginkgo sequential e2e test.
The test verifies that when a namespace is managed by openshift-gitops, the openshift-gitops-argocd-application-controller Role is created and correctly aggregates rules from ClusterRoles labeled rbac.authorization.k8s.io/aggregate-to-admin, then removes those rules when the ClusterRole is deleted.
LOGS -
Local execution of 1-113 ginkgo test.txt