Port kuttl 1-113 validate controller role test to Ginkgo#1214
Port kuttl 1-113 validate controller role test to Ginkgo#1214Naveena-058 wants to merge 3 commits into
Conversation
Signed-off-by: NAVEENA S <nas@redhat.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
📝 WalkthroughWalkthroughAdds a sequential Ginkgo E2E test that verifies an aggregated ChangesRBAC aggregation validation
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 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.
| } | ||
| } | ||
|
|
||
| return false |
There was a problem hiding this comment.
Please describe the mismatch for better defect localization. IOW, if this fails in an environment where we cannot investigate immediately, this provides no details of what have happened.
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