From 5383dd5885c9282eefadfecef2675998142712fe Mon Sep 17 00:00:00 2001 From: Tomas Turina Date: Thu, 3 Nov 2022 11:02:57 -0300 Subject: [PATCH 1/3] fix(#3369)!: adapted to multi_groups changes --- deps/wazuh_testing/wazuh_testing/remote.py | 2 +- .../test_multi_groups/test_merged_mg_file_content.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deps/wazuh_testing/wazuh_testing/remote.py b/deps/wazuh_testing/wazuh_testing/remote.py index 779e5be4bf..f7001d1bdb 100644 --- a/deps/wazuh_testing/wazuh_testing/remote.py +++ b/deps/wazuh_testing/wazuh_testing/remote.py @@ -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) diff --git a/tests/integration/test_remoted/test_multi_groups/test_merged_mg_file_content.py b/tests/integration/test_remoted/test_multi_groups/test_merged_mg_file_content.py index 667a8ab833..3d638798df 100644 --- a/tests/integration/test_remoted/test_multi_groups/test_merged_mg_file_content.py +++ b/tests/integration/test_remoted/test_multi_groups/test_merged_mg_file_content.py @@ -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}." From 4a2166a18f51d7e5ef2fb0e8b1eaff2d0a07bd9c Mon Sep 17 00:00:00 2001 From: Kevin Ledesma Date: Fri, 4 Nov 2022 15:57:53 -0300 Subject: [PATCH 2/3] docs(#3369): added changes to changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a5d9f9fea7..867c713dd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) From 846b2bab82769df0cacf2be02940e20412e2bbfe Mon Sep 17 00:00:00 2001 From: Kevin Ledesma Date: Mon, 7 Nov 2022 14:10:00 -0300 Subject: [PATCH 3/3] style(#3369): fixed callback regex --- deps/wazuh_testing/wazuh_testing/remote.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/wazuh_testing/wazuh_testing/remote.py b/deps/wazuh_testing/wazuh_testing/remote.py index f7001d1bdb..ee4bb6b54d 100644 --- a/deps/wazuh_testing/wazuh_testing/remote.py +++ b/deps/wazuh_testing/wazuh_testing/remote.py @@ -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")