Skip to content
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

Adapt to multi_groups modifications #3565

Merged
merged 3 commits into from
Jan 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ Release report: TBD
- Add `monitord.rotate_log` to `local_internal_options` file for `test_macos_format_query` ([#3602](https://github.com/wazuh/wazuh-qa/pull/3602)) \- (Tests)
- Adapt analysisd integration tests for EPS ([#3559](https://github.com/wazuh/wazuh-qa/issues/3559)) \- (Tests)
- Improve `test_remove_audit` FIM test to retry install and remove command ([#3562](https://github.com/wazuh/wazuh-qa/pull/3562)) \- (Tests)
- Update pattern and expected condition for multi_groups tests ([#3565](https://github.com/wazuh/wazuh-qa/pull/3565)) \- (Tests)
- Skip unstable integration tests for gcloud ([#3531](https://github.com/wazuh/wazuh-qa/pull/3531)) \- (Tests)
- Skip unstable integration test for agentd ([#3538](https://github.com/wazuh/wazuh-qa/pull/3538))
- Update wazuhdb_getconfig and EPS limit integration tests ([#3146](https://github.com/wazuh/wazuh-qa/pull/3146)) \- (Tests)
Expand Down
4 changes: 2 additions & 2 deletions deps/wazuh_testing/wazuh_testing/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ def wait_to_remoted_update_groups(wazuh_log_monitor):
# The log is truncated to ensure that the information has been loaded after the agent has been registered.
truncate_file(LOG_FILE_PATH)

callback_pattern = '.*c_files().*End updating shared files sums.'
callback_pattern = '.*c_files().*End updating shared files.'
error_message = 'Could not find the groups reload log'

check_remoted_log_event(wazuh_log_monitor, callback_pattern, error_message, timeout=SYNC_FILES_TIMEOUT)
Expand Down Expand Up @@ -684,7 +684,7 @@ def keep_alive_until_group_configuration_sent(sender, interval=1, timeout=20):
args=(sender,))
keep_alive_agent.start()

log_callback = make_callback(pattern=".*End sending file '.+' to agent '\d+'\.", prefix='.*wazuh-remoted.*')
log_callback = make_callback(pattern=r".*End sending file '.+' to agent '\d+'\.", prefix=r'.*wazuh-remoted.*')
log_monitor = FileMonitor(LOG_FILE_PATH)
log_monitor.start(timeout=REMOTED_GLOBAL_TIMEOUT, callback=log_callback,
error_message="New shared configuration was not sent")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def test_merged_mg_file_content(metadata, configure_local_internal_options_modul
else:
raise FileNotFoundError(f"The file: {merged_mg_file} was not created.")

expected_conditions = [True, [expected_line + '\n']] if action == 'create' else [False, []]
expected_conditions = [False, [expected_line + '\n']] if action == 'create' else [False, []]
assert file_exists == expected_conditions[0], f"The file was not {action}d in the multigroups directory.\n"
if action == 'created':
assert match_expected_line in expected_conditions[1], f"The file is not in {merged_mg_file}."
Expand Down