-
Notifications
You must be signed in to change notification settings - Fork 671
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 tests for file_permissions, file_owner, file_groupowner #11814
Fix tests for file_permissions, file_owner, file_groupowner #11814
Conversation
Hi @mpurg. Thanks for your PR. I'm waiting for a ComplianceAsCode member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
🤖 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: |
Do you have any rule that uses these templates with the file_regex parameter and where these templated scenarios aren't shadowed? I found multiple rules using these templates with the file_regex parameter but all of them shadow the templated test scenarios. Do you know where the changes are seen in practice? Also, do you plan to remove the shadowing files? What about other templated test scenarios that also have the |
Hm... I was implementing new rules for the Ubuntu 22.04 STIG (to be PR-ed) and noticed that these tests were failing. There weren't any custom tests in the rules I was using as a template ( Regarding the other test scenarios, I guess I didn't trip over them because they are pass tests and will thus succeed on a system where ownership/permissions are already compliant. |
/packit retest-failed |
@mpurg thanks for explanation! |
@mpurg , could you rebase the PR so the |
7f6c76e
to
3b4c25b
Compare
@marcusburghardt done |
/packit build |
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, thanks!
lenient_permissions.fail.sh test did not fail when run on a compliant system because the permissions were not modified.
incorrect_owner.fail.sh test did not fail when run on a compliant system because the ownership was not modified. (cherry picked from commit 68664db)
incorrect_groupowner.fail.sh test did not fail when run on a compliant system because the group ownership was not modified. (cherry picked from commit 328c2ae)
3b4c25b
to
eda77ab
Compare
Code Climate has analyzed commit eda77ab 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 59.4% (0.0% change). View more on Code Climate. |
/packit retest-failed |
Description:
file_permissions
,file_owner
,file_groupowner
templatesRationale: