-
Notifications
You must be signed in to change notification settings - Fork 32
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
IT FIM- Refactor Registry file limit tests #2478
Conversation
...ation/test_fim/test_registry/test_registry_file_limit/test_registry_limit_capacity_alerts.py
Outdated
Show resolved
Hide resolved
...ation/test_fim/test_registry/test_registry_file_limit/test_registry_limit_capacity_alerts.py
Outdated
Show resolved
Hide resolved
tests/integration/test_fim/test_registry/test_registry_file_limit/test_registry_limit_full.py
Outdated
Show resolved
Hide resolved
tests/integration/test_fim/test_registry/test_registry_file_limit/test_registry_limit_values.py
Outdated
Show resolved
Hide resolved
...est_registry/test_registry_report_changes/test_disk_quota/test_registry_disk_quota_values.py
Outdated
Show resolved
Hide resolved
...est_registry/test_registry_report_changes/test_disk_quota/test_registry_disk_quota_values.py
Outdated
Show resolved
Hide resolved
.../test_fim/test_registry/test_registry_report_changes/test_registry_diff_size_limit_values.py
Outdated
Show resolved
Hide resolved
...ration/test_fim/test_registry/test_registry_report_changes/test_registry_file_size_values.py
Outdated
Show resolved
Hide resolved
...ation/test_fim/test_registry/test_registry_file_limit/test_registry_limit_capacity_alerts.py
Outdated
Show resolved
Hide resolved
...m/test_registry/test_registry_report_changes/data/wazuh_registry_diff_size_limit_values.yaml
Outdated
Show resolved
Hide resolved
assert database_state == '100', 'Wrong value for full database alert.' | ||
else: | ||
pytest.fail('Did not receive the value of the database state,') | ||
assert database_state == '100', ERR_MSG_WRONG_VALUE_FOR_DATABASE_FULL |
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.
Also, Could you change the 'ossec.log' name in the documentation, please?? You could change it by the wazuh logs, or something like that.
Because on 5.0 the ossec.log
wil change to wazuh.log
...y/test_registry_report_changes/test_disk_quota/test_registry_disk_quota_bigger_file_limit.py
Outdated
Show resolved
Hide resolved
...y/test_registry_report_changes/test_disk_quota/test_registry_disk_quota_bigger_file_limit.py
Outdated
Show resolved
Hide resolved
...est_registry/test_registry_report_changes/test_disk_quota/test_registry_disk_quota_values.py
Outdated
Show resolved
Hide resolved
...est_registry/test_registry_report_changes/test_disk_quota/test_registry_disk_quota_values.py
Outdated
Show resolved
Hide resolved
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.
GJ! but some changes are required
tests/integration/test_fim/test_registry/test_registry_file_limit/test_registry_limit_full.py
Outdated
Show resolved
Hide resolved
.../test_fim/test_registry/test_registry_report_changes/test_registry_diff_size_limit_values.py
Outdated
Show resolved
Hide resolved
test_data_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'data') | ||
wazuh_log_monitor = FileMonitor(LOG_FILE_PATH) | ||
reg1, reg2 = test_regs | ||
size_limit_configured = 10 * 1024 | ||
size_limit_configured = SIZE_LIMIT_CONFIGURED_VALUE |
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.
Use directly SIZE_LIMIT_CONFIGURED_VALUE instead of defining a new variable size_limit_configured
|
- MODULE_NAME | ||
- test_registry_limit_capacity_alerts | ||
- test_registry_limit_full | ||
- test_registry_limit_values |
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.
Why did you change it?
...ation/test_fim/test_registry/test_registry_file_limit/test_registry_limit_capacity_alerts.py
Outdated
Show resolved
Hide resolved
realtime: Enable real-time monitoring on Linux (using the 'inotify' system calls) and Windows systems. | ||
whodata: Implies real-time monitoring but adding the 'who-data' information. |
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.
Why did you delete these? Is it not working with real-time mode and whodata mode?
tests/integration/test_fim/test_registry/test_registry_file_limit/test_registry_limit_values.py
Outdated
Show resolved
Hide resolved
|
||
@pytest.mark.parametrize("size", [(8192), (32768)]) |
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.
Please add a comment explaining what these numbers mean. We know it, but this test must be clear to external teams.
...y/test_registry_report_changes/test_disk_quota/test_registry_disk_quota_bigger_file_limit.py
Outdated
Show resolved
Hide resolved
@pytest.mark.parametrize('size', [ | ||
(4 * 1024), | ||
(16 * 1024), | ||
@pytest.mark.parametrize('size', [(4096), (16384)]) |
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.
Please add a comment explaining what these numbers mean. We know it, but this test must be clear to external teams.
Co-authored-by: Dámaris <[email protected]>
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.
|
|
Description
In this PR the following changes were made:
test_registry_file_limit
folder to new Standardtest_registry_limit_values.py
because of wazuh/wazuh issue #11819Time Travel
from all tes_registry_report_changes tests that were refactoredtest_report_changes_after_restart
because of flaky behaviour in Jenkins. Added to Issue [#2174]Configuration options
Windows Agent Package: 4.3.0-1
Local Internal Options
Tests
pycodestyle --max-line-length=120 --show-source --show-pep8 file.py
.