-
Notifications
You must be signed in to change notification settings - Fork 686
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
Add syslog_files rules test scenarios #4743
Add syslog_files rules test scenarios #4743
Conversation
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 preparation part (create test files, test config and directory) is still same for each test scenario, the only difference is number of files.
Could you create function for it (e.g. with number of files as parameter)? This function could be placed in group_ensure_rsyslog_log_file_configuration
folder and used by all test scenarios you made. And test scenarios would only call it and then contain the important part - setting ownership/permissions and creating rsyslog config.
...slog_log_file_configuration/rule_rsyslog_files_groupownership/IncludeConfig_is_other.fail.sh
Outdated
Show resolved
Hide resolved
...slog_log_file_configuration/rule_rsyslog_files_groupownership/IncludeConfig_is_other.fail.sh
Outdated
Show resolved
Hide resolved
...slog_log_file_configuration/rule_rsyslog_files_groupownership/IncludeConfig_is_other.fail.sh
Outdated
Show resolved
Hide resolved
4793431
to
08be3bc
Compare
@mildas thanks for your review, suggested changes make sense to me. |
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.
Thank you for update. I have just few more minor issues, mostly with so much empty lines, so please remove some of them (e.g. between chgrp
, chmod
etc.)
...slog_log_file_configuration/rule_rsyslog_files_groupownership/IncludeConfig_is_other.fail.sh
Outdated
Show resolved
Hide resolved
...slog_log_file_configuration/rule_rsyslog_files_groupownership/IncludeConfig_is_other.fail.sh
Outdated
Show resolved
Hide resolved
.../group_system/group_logging/group_ensure_rsyslog_log_file_configuration/rsyslog_log_utils.sh
Show resolved
Hide resolved
Signed-off-by: Ilya Okomin <ilya.okomin@oracle.com>
Signed-off-by: Ilya Okomin <ilya.okomin@oracle.com>
Signed-off-by: Ilya Okomin <ilya.okomin@oracle.com>
08be3bc
to
c4655f4
Compare
Tried these test on top of #4379 fix (on rhel8 and fedora30) and they pass/fail as expected. Thank you! |
Description:
In order to get #4379 verified introduced test scenarios for rsyslog_files_* rules.
Test scenarios check include log rules, include() object (rsyslog v8.33.0+: RHEL8, OL8, Fedora) and $IncludeConfig directive.
Added tests for rules:
Testing: