-
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 Tests: FIM - Refactor limits test of test report changes #2417
IT Tests: FIM - Refactor limits test of test report changes #2417
Conversation
# FIM modules | ||
SCHEDULE_MODE = 'scheduled' | ||
|
||
# Yaml Configuration | ||
YAML_CONF_REGISTRY_RESPONSE = 'wazuh_conf_registry_responses_win32.yaml' | ||
YAML_CONF_SYNC_WIN32 = 'wazuh_sync_conf_win32.yaml' | ||
YAML_CONF_DIFF = 'wazuh_conf_diff.yaml' |
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 add config yaml files here, if they will be used only on a specific test?
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.
Currently, this configuration is only used in one test but the idea is to reuse it in the next refactors
configurations_path = os.path.join(test_data_path, 'wazuh_conf.yaml') | ||
testdir1 = test_directories[0] | ||
DIFF_LIMIT_VALUE = 2 | ||
test_directories = [os.path.join(PREFIX, TEST_DIR_1)] |
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 use test_directories as an array, if only One test path will be used? And it won't be passed as an iterable on configuration, but it's hardcoded to only use the first in the array?
Better change it to a simple string instead of an array for legibility.
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.
Done in commit 543b1
|
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.
All works correctly. Will need to run tests on local environments when we are done with Issue #2421.
Description
Changes applied in this PR:
test just not run. When this changes the test only runs nine times and there isn't a skipped test.
Important
In this PR we only work on tests:
but we apply a small change to use other Callback in order to not affect the tests:
Configuration options
Configuration options
test_fim/test_files/test_report_changes/test_diff_size_limit_configured.py
tests/integration/test_fim/test_files/test_report_changes/test_diff_size_limit_default.py
test_fim/
Tests
pycodestyle --max-line-length=120 --show-source --show-pep8 file.py
.