8000 postfix_client_configure_mail_alias: adjust test scenario by vojtapolasek · Pull Request #13334 · ComplianceAsCode/content · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

postfix_client_configure_mail_alias: adjust test scenario #13334

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

Conversation

vojtapolasek
Copy link
Collaborator

Description:

  • correct test scenario: use the same text which is used in the default variable

Rationale:

  • the text which was there before was aligned with a different variable

Review Hints:

Use automatus to test the rule.

@vojtapolasek vojtapolasek added the Test Suite Update in Test Suite. label Apr 15, 2025
@vojtapolasek vojtapolasek added this to the 0.1.77 milestone Apr 15, 2025
@jan-cerny jan-cerny self-assigned this Apr 15, 2025
@@ -1,4 +1,4 @@
#!/bin/bash
# packages = postfix

echo "root: system.administrator@mail.mil" > /etc/aliases
echo "root: change_me@localhost" > /etc/aliases
Copy link
Collaborator

Choose a reason for hiding this comment

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

In addition I would prefer to explicitly set the variable value using the variables test scenario header to prevent unwanted drifts of the value.

@vojtapolasek
Copy link
Collaborator Author

@jan-cerny that is reasonable, done.

Copy link
codeclimate bot commented Apr 16, 2025

Code Climate has analyzed commit d5d381d 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 successfully run locally on a RHEL 9 virtual machine back end.

jcerny@fedora:~/work/git/scap-security-guide (pr/13334)$ python3 tests/automatus.py rule --libvirt qemu:///system ssgts_rhel9 postfix_client_configure_mail_alias
Setting console output to log level INFO
INFO - The base image option has not been specified, choosing libvirt-based test environment.
INFO - Logging into /home/jcerny/work/git/scap-security-guide/logs/rule-custom-2025-04-16-1330/test_suite.log
INFO - xccdf_org.ssgproject.content_rule_postfix_client_configure_mail_alias
INFO - Script file_missing.fail.sh using profile (all) OK
INFO - Script no_root_alias.fail.sh using profile (all) OK
INFO - Script correct.pass.sh using profile (all) OK
INFO - Script wrong.fail.sh using profile (all) OK
jcerny@fedora:~/work/git/scap-security-guide (pr/13334)$ python3 tests/automatus.py rule --libvirt qemu:///system ssgts_rhel9 --remediate-using ansible postfix_client_configure_mail_alias
Setting console output to log level INFO
INFO - The base image option has not been specified, choosing libvirt-based test environment.
INFO - Logging into /home/jcerny/work/git/scap-security-guide/logs/rule-custom-2025-04-16-1331/test_suite.log
INFO - xccdf_org.ssgproject.content_rule_postfix_client_configure_mail_alias
INFO - Script file_missing.fail.sh using profile (all) OK
INFO - Script no_root_alias.fail.sh using profile (all) OK
INFO - Script correct.pass.sh using profile (all) OK
INFO - Script wrong.fail.sh using profile (all) OK

@jan-cerny jan-cerny merged commit d047fc7 into ComplianceAsCode:master Apr 16, 2025
108 of 109 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Test Suite Update in Test Suite.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0