-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🌱 Fix CRS e2e helper with multiple bindings #10191
🌱 Fix CRS e2e helper with multiple bindings #10191
Conversation
/area e2e-testing |
bbfb1ef
to
45b38cc
Compare
45b38cc
to
f21b253
Compare
Check the relevant ResourceSetBinding to see if the resource is applied. If multiple ClusterResourceSets match a cluster, the ClusterResourceSetBinding will have multiple bindings and so only the relevant ResourceSetBinding should be checked.
f21b253
to
78e9c3f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last round of nits: we don't need the bool, nil checking should be enough.
Thanks for your reviews @chrischdi! I've applied your suggestions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
LGTM label has been added. Git tree hash: 21eac5de9689f3b912402156c23bfc82fbe4741d
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add a test?
I've added a test for the utility function but not for the full helper as that will be a lot more involved. I don't see tests for any of the other helpers so hope that's ok. Let me know what you think. 🙏 |
@vincepri @chrischdi Would you be able to take another look please? 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
LGTM label has been added. Git tree hash: ffe0051d457154c63ed9c68d543479d93275c821
|
Thanks for fixing this! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fabriziopandini The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
* test(e2e): Fix CRS helper with multiple bindings Check the relevant ResourceSetBinding to see if the resource is applied. If multiple ClusterResourceSets match a cluster, the ClusterResourceSetBinding will have multiple bindings and so only the relevant ResourceSetBinding should be checked. * fixup! refactor: Apply review suggestions * fixup! test: Add test for CRS e2e helper
* test(e2e): Fix CRS helper with multiple bindings Check the relevant ResourceSetBinding to see if the resource is applied. If multiple ClusterResourceSets match a cluster, the ClusterResourceSetBinding will have multiple bindings and so only the relevant ResourceSetBinding should be checked. * fixup! refactor: Apply review suggestions * fixup! test: Add test for CRS e2e helper
Check all bindings to see if the resource is applied. If multiple ClusterResourceSets match a cluster, the ClusterResourceSetBinding will have multiple bindings and so only the ResourceSetBinding related to the specific ClusterResourceSet must be checked.
I discovered this when using the e2e test framework in an external project that applied multiple ClusterResourceSets to a cluster as part of the e2e tests.