-
Notifications
You must be signed in to change notification settings - Fork 698
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
Mark some scenarios as specific to SCE #12052
Conversation
We introduce a new test scenarios header `check` that allows to mark test scenarios as specific to a single check engine type. For example, adding header `check = sce` to a test scenario marks this test scenario as specific only to SCE. If SCE check isn't available, such scenario will be skipped. If the `check` header isn't specified in a test scenario, the test scenario will work with any check type. Fixes: ComplianceAsCode#12030
🤖 A k8s content image for this PR is available at: Click here to see how to deploy itIf you alread have Compliance Operator deployed: Otherwise deploy the content and operator together by checking out ComplianceAsCode/compliance-operator and: |
/test 4.15-images |
I'm still getting some errors, after this fix. Is there something I'm missing? |
@Mab879 I think you're missing support for SCE in OpenSCAP running in your virtual machine. Check if This revealed a problem that this PR doesn't address the situation when the SCE check is going to be tested but OpenSCAP doesn't support SCE. We need to think how to address this situation. |
For SCE test scenarios we will check if SCE is supported by OpenSCAP installed in the testing back end. If OpenSCAP on the back end doesn't support SCE we will display a warning and skip the tests. SCE support will be verified only once, during the back end initialization.
I have add logic that checks if the SCE tests are supported by OpenSCAP on the back end. |
Code Climate has analyzed commit 6602496 and detected 1 issue on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 59.4% (0.0% change). View more on Code Climate. |
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.
The new behavior works correctly.
Thanks.
Waving the Rawhide tests as it appears to be failure in dnf. Codeclimate finding can be waived for the moment. |
Description:
We introduce a new test scenarios header
check
that allows to mark test scenarios as specific to a single check engine type. For example, adding headercheck = sce
to a test scenario marks this test scenario as specific only to SCE. If SCE check isn't available, such scenario will be skipped. If thecheck
header isn't specified in a test scenario, the test scenario will work with any check type.For SCE test scenarios we will also check if SCE support is installed in OpenSCAP in the back end and we will skip the test if SCE support isn't available there.
Rationale:
Fixes: #12030
Review Hints: