From a8b0ed9d281001a31ef827afbafe206a5745ccb0 Mon Sep 17 00:00:00 2001 From: Andres Carmelo Micalizzi Date: Tue, 19 Dec 2023 15:38:12 +0100 Subject: [PATCH 1/4] fix: handle one_manager_env marker --- tests/system/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/system/conftest.py b/tests/system/conftest.py index 92d60b7897..2440bd81d0 100644 --- a/tests/system/conftest.py +++ b/tests/system/conftest.py @@ -126,7 +126,7 @@ def pytest_runtest_makereport(item, call): arguments[key] = str(value) extra.append(pytest_html.extras.json(arguments, name="Test arguments")) - if "cluster" in report.markers: + if "cluster" in report.markers and "one_manager_agent_env" not in report.markers: host_manager = getattr(item.module, "host_manager") for host in host_manager.get_inventory()['managers']['hosts']: From 7524a64a8d71f825646f2547c743b83aeb15cdea Mon Sep 17 00:00:00 2001 From: Andres Carmelo Micalizzi Date: Tue, 19 Dec 2023 16:00:54 +0100 Subject: [PATCH 2/4] docs: update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 26d6a33992..7f6719d154 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ All notable changes to this project will be documented in this file. ### Changed +- Fix one_manager_agent_env pytest marker for System Tests ([#4763](https://github.com/wazuh/wazuh-qa/pull/4763)) \- (Tests) - Enhance macOS deployment ansible taks ([#4685](https://github.com/wazuh/wazuh-qa/pull/4685)) \- (Framework) - Updated Filebeat module to 0.3 ([#4700](https://github.com/wazuh/wazuh-qa/pull/4700)) \- (Framework) - Change database v13 to v12. ([#4677](https://github.com/wazuh/wazuh-qa/pull/4677)) \- (Tests) From 0d439954a82568453dad5ce801a6ea4a839b6653 Mon Sep 17 00:00:00 2001 From: Andres Carmelo Micalizzi Date: Tue, 19 Dec 2023 16:44:23 +0100 Subject: [PATCH 3/4] docs: update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f6719d154..a9d5b652aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,7 @@ All notable changes to this project will be documented in this file. ### Changed -- Fix one_manager_agent_env pytest marker for System Tests ([#4763](https://github.com/wazuh/wazuh-qa/pull/4763)) \- (Tests) +- Fix one_manager_agent_env pytest marker for System Tests ([#4782](https://github.com/wazuh/wazuh-qa/pull/4782)) \- (Tests) - Enhance macOS deployment ansible taks ([#4685](https://github.com/wazuh/wazuh-qa/pull/4685)) \- (Framework) - Updated Filebeat module to 0.3 ([#4700](https://github.com/wazuh/wazuh-qa/pull/4700)) \- (Framework) - Change database v13 to v12. ([#4677](https://github.com/wazuh/wazuh-qa/pull/4677)) \- (Tests) From 0baa8e303905ec25290fadc055250847f3155749 Mon Sep 17 00:00:00 2001 From: Andres Carmelo Micalizzi Date: Tue, 19 Dec 2023 16:44:45 +0100 Subject: [PATCH 4/4] fix: remove unnecesary cluster marker --- tests/system/conftest.py | 2 +- .../test_correct_merged_file_generation.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/system/conftest.py b/tests/system/conftest.py index 2440bd81d0..92d60b7897 100644 --- a/tests/system/conftest.py +++ b/tests/system/conftest.py @@ -126,7 +126,7 @@ def pytest_runtest_makereport(item, call): arguments[key] = str(value) extra.append(pytest_html.extras.json(arguments, name="Test arguments")) - if "cluster" in report.markers and "one_manager_agent_env" not in report.markers: + if "cluster" in report.markers: host_manager = getattr(item.module, "host_manager") for host in host_manager.get_inventory()['managers']['hosts']: diff --git a/tests/system/test_cluster/test_correct_merged_file_generation/test_correct_merged_file_generation.py b/tests/system/test_cluster/test_correct_merged_file_generation/test_correct_merged_file_generation.py index 6fd1244126..94a045b05e 100644 --- a/tests/system/test_cluster/test_correct_merged_file_generation/test_correct_merged_file_generation.py +++ b/tests/system/test_cluster/test_correct_merged_file_generation/test_correct_merged_file_generation.py @@ -35,7 +35,7 @@ from system import (assign_agent_to_new_group, clean_cluster_logs, create_new_agent_group, delete_agent_group, restart_cluster) -pytestmark = [pytest.mark.cluster, pytest.mark.one_manager_agent_env] +pytestmark = [pytest.mark.one_manager_agent_env] agent_conf_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'provisioning', 'one_manager_agent', 'roles', 'agent-role', 'files', 'ossec.conf')