8000 Add rule removed test by Mab879 · Pull Request #13358 · ComplianceAsCode/content · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add rule removed test #13358

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

Merged
merged 9 commits into from
Apr 18, 2025
Merged

Conversation

Mab879
Copy link
Member
@Mab879 Mab879 commented Apr 17, 2025

Description:

Add tests for RHEL (and other in future) to see if a rule has been removed based on the last release.

Rationale:

So we don't have to manually review this.

Review Hints:

  1. Remove a rule from the default profile on a RHEL product.
  2. wget https://github.com/ComplianceAsCode/content/releases/download/v0.1.76/scap-security-guide-0.1.76.zip
  3. unzip scap-security-guide-0.1.76.zip
  4. export ADDITIONAL_CMAKE_OPTIONS="-DENABLE_CHECK_RULE_REMOVAL:BOOL=ON -DOLD_RELEASE_DIR=scap-security-guide-0.1.76"
  5. ./build_product rhel9 rhel10 rhel8 # or whatever product you changed
  6. ctest -R rule-removal --output-on-failure

@Mab879 Mab879 marked this pull request as draft April 17, 2025 16:11
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Used by openshift-ci bot. label Apr 17, 2025
@Mab879 Mab879 added this to the 0.1.77 milestone Apr 17, 2025
@Mab879 Mab879 force-pushed the add_rule_removed_test branch from e161e44 to 29c835e Compare April 17, 2025 19:37
@Mab879 Mab879 marked this pull request as ready for review April 17, 2025 19:37
@Mab879 Mab879 requested a review from a team as a code owner April 17, 2025 19:37
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Used by openshift-ci bot. label Apr 17, 2025
@Mab879 Mab879 force-pushed the add_rule_removed_test branch from 29c835e to 2170d8f Compare April 17, 2025 19:44
@jan-cerny jan-cerny self-assigned this Apr 18, 2025
Copy link
Collaborator
@jan-cerny jan-cerny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have reviewed that the test passes as a part of the "Build, Test on Fedora Latest" CI job. I have also run the test locally and it detected my change and failed successfully.

@Mab879 Mab879 requested a review from jan-cerny April 18, 2025 13:08
Copy link
codeclimate bot commented Apr 18, 2025

Code Climate has analyzed commit 8798b3d and detected 0 issues on this pull request.

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 61.9% (0.0% change).

View more on Code Climate.

Copy link
Collaborator
@jan-cerny jan-cerny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have reviewed the CI output of the Build, Test on Fedora Latest job and I have managed to run the test locally and make it fail successfully.

@jan-cerny jan-cerny merged commit aeb495e into ComplianceAsCode:master Apr 18, 2025
109 checks passed
@Mab879 Mab879 deleted the add_rule_removed_test branch April 18, 2025 18:00
@Mab879 Mab879 added the Infrastructure Our content build system label Jun 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Infrastructure Our content build system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0