-
Notifications
You must be signed in to change notification settings - Fork 22
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
OCPBUGS-6780: Add a test to expose cleanup issue with SSBs #295
base: master
Are you sure you want to change the base?
Conversation
When you remove a profile from a ScanSettingBinding after it's already been run, the Compliance Operator doesn't clean it up. This commit adds a test to expose that.
@rhmdnd: This pull request references Jira Issue OCPBUGS-6780, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. In response to this:
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. |
[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 |
The assertions in the test still need some work to make sure we're checking the scan properly after updating the binding. Throwing what I have in review for now. |
} | ||
|
||
// We might need a different utility to rerun a suite instead of scan | ||
err = f.ReRunScan(scanSettingBinding.Name, f.OperatorNamespace) |
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 fails because the scan name isn't the binding name. Need to find a better way to assert this...
Or maybe we just go right into the assertions below about the scans. I guess it depends on where the cleanup happens. If it happens in the SSB controller, we probably won't need to rescan.
I'm open to recommendations here.
@@ -1451,3 +1471,28 @@ func (f *Framework) AssertHasCheck(suiteName, scanName string, check compv1alpha | |||
|
|||
return nil | |||
} | |||
|
|||
func (f *Framework) ReRunScan(scanName, namespace string) error { |
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 will conflict with a couple other patches I have that need this. Just a heads up for the rebase.
/hold for test |
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. |
Below is also the steps to reproduce:
|
/unhold |
@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. |
When you remove a profile from a ScanSettingBinding after it's already
been run, the Compliance Operator doesn't clean it up.
This commit adds a test to expose that.