-
Notifications
You must be signed in to change notification settings - Fork 28
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
Expose test clean up issues in compliance scan controller #419
Expose test clean up issues in compliance scan controller #419
Conversation
While in the process of updating the controller-runtime from 0.15.0 to 0.16.2, I noticed some strange failures in the unit tests. Specifically, it didn't look like some of the resources were getting cleaned up properly, even though we attempt to create them before each spec.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rhmdnd 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 |
BeforeEach(func() { | ||
// Create the pods and the secret for the test | ||
createFakeScanPods(reconciler, compliancescaninstance.Name, nodeinstance1.Name, nodeinstance2.Name) | ||
createFakeRsSecret(reconciler, compliancescaninstance.Name) | ||
secret, err = createFakeRsSecret(reconciler, compliancescaninstance.Name) | ||
Expect(err).ToNot(HaveOccurred()) |
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.
This is failing because the error returned is a 409, even though we expect createFakeRsSecret
to create the secret we want to test with...
Seems like something isn't cleaning up properly?
Recreated the issue in CI:
|
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@rhmdnd: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Closing this since we're updated to a newer version of controller-runtime. |
While in the process of updating the controller-runtime from 0.15.0 to
0.16.2, I noticed some strange failures in the unit tests. Specifically,
it didn't look like some of the resources were getting cleaned up
properly, even though we attempt to create them before each spec.