From 0c2c3e32c3c87dda0f6839008bd998eb9ecb2b49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Rebollo=20P=C3=A9rez?= Date: Wed, 21 Aug 2024 12:33:42 +0100 Subject: [PATCH 01/34] docs: update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d529d94d7..d89a3f6658 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file. ### Added +- Adding jobflow templates ([#5680](https://github.com/wazuh/wazuh-qa/pull/5680/)) \- (Framework) - Add RockyLinux 8.10 to Allocator module ([#5524](https://github.com/wazuh/wazuh-qa/pull/5524)) \- (Framework) - Add Deployability testing tier 1 ([#5190](https://github.com/wazuh/wazuh-qa/pull/5190)) \- (Framework + Documentation + Tests) - Add Workflow module to Wazuh-qa repository ([#4990](https://github.com/wazuh/wazuh-qa/pull/4990)) \- (Tests) @@ -32,6 +33,7 @@ All notable changes to this project will be documented in this file. ### Fixed +- Fix playbook cleanup.yaml ([#5672](https://github.com/wazuh/wazuh-qa/pull/5672)) \- (Tests) - Fixed unnecesary reference to debian file in dashboard provisioning task ([#5643](https://github.com/wazuh/wazuh-qa/pull/5643)) \- (Framework) - Changed 'Ensure that the manager version is' expected warning to an agnostic version of regex ([#5630](https://github.com/wazuh/wazuh-qa/pull/5630)) \- (Tests) - Adding fixed and dynamic waits to port status checks ([#5627](https://github.com/wazuh/wazuh-qa/pull/5627)) (Framework) From 9af7b7243b9bbbbeb52ffcb9ae0a5b11fa0caa7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Rebollo=20P=C3=A9rez?= Date: Wed, 21 Aug 2024 13:01:36 +0100 Subject: [PATCH 02/34] feat: bump 4.9.0 revision to 40906 --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index 68a33aea49..5a3ccead7c 100644 --- a/version.json +++ b/version.json @@ -1,4 +1,4 @@ { "version": "4.9.0", - "revision": "40905" + "revision": "40906" } From a92ba7cdb7ce5920966fc354dd9228008c959482 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Rebollo=20P=C3=A9rez?= Date: Fri, 30 Aug 2024 09:01:10 +0100 Subject: [PATCH 03/34] feat: bump 4.9.0 revision to 40907 --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index 5a3ccead7c..ea7228044a 100644 --- a/version.json +++ b/version.json @@ -1,4 +1,4 @@ { "version": "4.9.0", - "revision": "40906" + "revision": "40907" } From 5afd21531e2aa73810c31dec78714108638a20c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Rebollo=20P=C3=A9rez?= Date: Tue, 3 Sep 2024 17:03:43 +0100 Subject: [PATCH 04/34] feat: increase result windows in VD E2E tests --- .../end_to_end/check_validators.py | 8 ++-- .../wazuh_testing/end_to_end/indexer_api.py | 1 + .../end_to_end/remote_operations_handler.py | 4 +- .../end_to_end/vulnerability_detector.py | 7 ++-- .../test_vulnerability_detector/conftest.py | 7 +++- .../test_vulnerability_detector.py | 41 +++++++++++++------ 6 files changed, 45 insertions(+), 23 deletions(-) diff --git a/deps/wazuh_testing/wazuh_testing/end_to_end/check_validators.py b/deps/wazuh_testing/wazuh_testing/end_to_end/check_validators.py index aa33e5761f..21abfa06c5 100644 --- a/deps/wazuh_testing/wazuh_testing/end_to_end/check_validators.py +++ b/deps/wazuh_testing/wazuh_testing/end_to_end/check_validators.py @@ -28,7 +28,7 @@ def compare_expected_found_vulnerabilities(vulnerabilities, expected_vulnerabili for vulnerability in expected_vulns: if vulnerability not in vulnerabilities.get(agent, []): logging.critical(f"Vulnerability not found for {agent}: {vulnerability}") - if agent not in vulnerabilities_not_found: + if agent not in vulnerabilities_not_found.keys(): vulnerabilities_not_found[agent] = [] failed_agents.append(agent) @@ -39,9 +39,10 @@ def compare_expected_found_vulnerabilities(vulnerabilities, expected_vulnerabili for vulnerability in agent_vulnerabilities: if vulnerability not in expected_vulnerabilities.get(agent, []): logging.critical(f"Vulnerability unexpected found for {agent}: {vulnerability}") - if agent not in vulnerabilities_unexpected: + if agent not in vulnerabilities_unexpected.keys(): vulnerabilities_unexpected[agent] = [] - failed_agents.append(agent) + if agent not in failed_agents: + failed_agents.append(agent) result = False vulnerabilities_unexpected[agent].append(vulnerability) @@ -161,4 +162,3 @@ def equals_but_not_empty(x, y): not any(x[host][level] for level in ["ERROR", "CRITICAL", "WARNING"]) for host in x ) - diff --git a/deps/wazuh_testing/wazuh_testing/end_to_end/indexer_api.py b/deps/wazuh_testing/wazuh_testing/end_to_end/indexer_api.py index 1ca658f186..4167f12b00 100644 --- a/deps/wazuh_testing/wazuh_testing/end_to_end/indexer_api.py +++ b/deps/wazuh_testing/wazuh_testing/end_to_end/indexer_api.py @@ -31,6 +31,7 @@ WAZUH_STATES_VULNERABILITIES_INDEXNAME_TEMPLATE = 'wazuh-states-vulnerabilities-{cluster_name}' +INDEXER_RESULT_WINDOWS_VULN_E2E = 50000 def get_wazuh_states_vulnerabilities_indexname(cluster_name: str = 'wazuh') -> str: diff --git a/deps/wazuh_testing/wazuh_testing/end_to_end/remote_operations_handler.py b/deps/wazuh_testing/wazuh_testing/end_to_end/remote_operations_handler.py index 4cab9687f0..618b2ae9a3 100644 --- a/deps/wazuh_testing/wazuh_testing/end_to_end/remote_operations_handler.py +++ b/deps/wazuh_testing/wazuh_testing/end_to_end/remote_operations_handler.py @@ -243,9 +243,9 @@ def get_vulnerability_alerts(host_manager: HostManager, agent_list, packages_dat def get_vulnerabilities_index(host_manager: HostManager, agent_list, packages_data: List[Dict], - greater_than_timestamp: str = "") -> Dict: + greater_than_timestamp: str = "", size=10000) -> Dict: vulnerabilities = get_vulnerabilities_from_states_by_agent(host_manager, agent_list, - greater_than_timestamp=greater_than_timestamp) + greater_than_timestamp=greater_than_timestamp, size=size) package_vulnerabilities = filter_vulnerabilities_by_packages(host_manager, vulnerabilities, packages_data) return package_vulnerabilities diff --git a/deps/wazuh_testing/wazuh_testing/end_to_end/vulnerability_detector.py b/deps/wazuh_testing/wazuh_testing/end_to_end/vulnerability_detector.py index 871b07ffeb..1e0c8eea04 100644 --- a/deps/wazuh_testing/wazuh_testing/end_to_end/vulnerability_detector.py +++ b/deps/wazuh_testing/wazuh_testing/end_to_end/vulnerability_detector.py @@ -275,7 +275,8 @@ def parse_vulnerability_from_state(state): def get_vulnerabilities_from_states_by_agent(host_manager: HostManager, agents: List[str], - greater_than_timestamp: str = None, cluster_name='wazuh') -> dict: + greater_than_timestamp: str = None, cluster_name='wazuh', + size=10000) -> dict: """Get vulnerabilities from the vulnerability state index by agent. Args: @@ -309,8 +310,8 @@ def get_vulnerabilities_from_states_by_agent(host_manager: HostManager, agents: filter=states_filter, index=index, credentials={'user': indexer_user, - 'password': indexer_password} - )['hits']['hits'] + 'password': indexer_password}, + size=size)['hits']['hits'] except KeyError as e: logging.error(f"No vulnerabilities were obtained for {agent}. Exception {str(e)}") diff --git a/tests/end_to_end/test_vulnerability_detector/conftest.py b/tests/end_to_end/test_vulnerability_detector/conftest.py index 181e641ec6..7467e339e6 100644 --- a/tests/end_to_end/test_vulnerability_detector/conftest.py +++ b/tests/end_to_end/test_vulnerability_detector/conftest.py @@ -52,7 +52,7 @@ def test_example(host_manager): restore_configuration, save_indexer_credentials_into_keystore) from wazuh_testing.end_to_end.indexer_api import ( - get_wazuh_states_vulnerabilities_indexname, delete_index) + get_wazuh_states_vulnerabilities_indexname, delete_index, extend_result_window, INDEXER_RESULT_WINDOWS_VULN_E2E) from wazuh_testing.end_to_end.logs import (get_hosts_alerts, get_hosts_logs, truncate_remote_host_group_files) from wazuh_testing.end_to_end.remote_operations_handler import ( @@ -320,8 +320,11 @@ def setup(preconditions, teardown, host_manager) -> Generator[Dict, None, None]: timeout_vulnerabilities_detected = len(agents_to_check) * PACKAGE_VULNERABILITY_SCAN_TIME time.sleep(timeout_syscollector_scan + timeout_vulnerabilities_detected) + vuln_index = get_wazuh_states_vulnerabilities_indexname() + extend_result_window(host_manager, index=vuln_index, new_max_result_window=INDEXER_RESULT_WINDOWS_VULN_E2E) - vulnerabilities = get_vulnerabilities_index(host_manager, agents_to_check, package_data) + vulnerabilities = get_vulnerabilities_index(host_manager, agents_to_check, package_data, + size=INDEXER_RESULT_WINDOWS_VULN_E2E) vulnerabilities_from_alerts = get_vulnerability_alerts(host_manager, agents_to_check, package_data, test_timestamp) diff --git a/tests/end_to_end/test_vulnerability_detector/test_vulnerability_detector.py b/tests/end_to_end/test_vulnerability_detector/test_vulnerability_detector.py index 8b2f73b6f6..1005f7f5c4 100644 --- a/tests/end_to_end/test_vulnerability_detector/test_vulnerability_detector.py +++ b/tests/end_to_end/test_vulnerability_detector/test_vulnerability_detector.py @@ -70,7 +70,9 @@ get_vulnerabilities_from_states_by_agent) from wazuh_testing.end_to_end.waiters import wait_until_vd_is_updated from wazuh_testing.tools.system import HostManager - +from wazuh_testing.end_to_end.indexer_api import (INDEXER_RESULT_WINDOWS_VULN_E2E, + extend_result_window, + get_wazuh_states_vulnerabilities_indexname) pytestmark = [pytest.mark.e2e, pytest.mark.vulnerability_detector, pytest.mark.tier0] @@ -192,6 +194,11 @@ def configure_vulnerability_detection_test_environment( yield test_timestamp +def max_result_window(host_manager): + vuln_index = get_wazuh_states_vulnerabilities_indexname() + extend_result_window(host_manager, index=vuln_index, new_max_result_window=INDEXER_RESULT_WINDOWS_VULN_E2E) + + @pytest.mark.filterwarnings("ignore::urllib3.exceptions.InsecureRequestWarning") class TestInitialScans: # Checks definition @@ -254,7 +261,7 @@ def test_first_syscollector_scan( configure_vulnerability_detection_test_environment, record_property, clean_environment_logs, - delete_states_vulnerability_index, + delete_states_vulnerability_index ): """ description: Validates the initiation of the first Syscollector scans across all agents in the environment. @@ -326,11 +333,13 @@ def test_first_syscollector_scan( logging.critical("Waiting until agent all agents have been scanned.") time.sleep(TIMEOUT_PER_AGENT_VULNERABILITY_FIRST_SCAN * len(AGENTS_SCANNED_FIRST_SCAN)) + max_result_window(host_manager) logging.critical("Checking vulnerabilities in the index") vuln_by_agent_index = get_vulnerabilities_from_states_by_agent( host_manager, AGENTS_SCANNED_FIRST_SCAN, greater_than_timestamp=FIRST_SCAN_TIME, + size=INDEXER_RESULT_WINDOWS_VULN_E2E ) # Store the vulnerabilities in the global variable to make the comparision in test_consistency_initial_scans @@ -371,7 +380,7 @@ def test_first_syscollector_scan( logging.critical("Checking for errors in the environment") unexpected_errors = check_errors_in_environment( - host_manager, expected_errors=VULNERABILITY_DETECTION_E2E_EXPECTED_ERRORS + host_manager, expected_errors=VULNERABILITY_DETECTION_E2E_EXPECTED_ERRORS, error_levels=['ERROR', 'CRITICAL'] ) test_result.validate_check( @@ -501,10 +510,12 @@ def test_syscollector_second_scan( global FIRST_SCAN_TIME + max_result_window(host_manager) + logging.critical("Checking vulnerabilities in the index") vuln_by_agent_index = get_vulnerabilities_from_states_by_agent( - host_manager, agents_to_check_vulns, greater_than_timestamp=FIRST_SCAN_TIME - ) + host_manager, agents_to_check_vulns, greater_than_timestamp=FIRST_SCAN_TIME, + size=INDEXER_RESULT_WINDOWS_VULN_E2E) logging.critical( "Checking that all agents has been scanned and generated vulnerabilities in the index" @@ -522,7 +533,7 @@ def test_syscollector_second_scan( unexpected_errors = check_errors_in_environment( host_manager, expected_errors=VULNERABILITY_DETECTION_E2E_EXPECTED_ERRORS, - greater_than_timestamp=get_timestamp, + greater_than_timestamp=get_timestamp, error_levels=['ERROR','CRITICAL'] ) test_result.validate_check( @@ -707,8 +718,10 @@ def test_install_vulnerable_package_when_agent_down(self, host_manager, request, time.sleep(VD_E2E_TIMEOUT_SYSCOLLECTOR_SCAN + PACKAGE_VULNERABILITY_SCAN_TIME * len(AGENTS_SCANNED_FIRST_SCAN)) package_data = [body["package"]] + max_result_window(host_manager) - vulnerabilities = get_vulnerabilities_index(host_manager, AGENTS_SCANNED_FIRST_SCAN, package_data) + vulnerabilities = get_vulnerabilities_index(host_manager, AGENTS_SCANNED_FIRST_SCAN, package_data, + size=INDEXER_RESULT_WINDOWS_VULN_E2E) expected_vulnerabilities = get_expected_index(host_manager, AGENTS_SCANNED_FIRST_SCAN, body["operation"], body["package"]) duplicated_vulnerabilities = get_duplicated_vulnerabilities(vulnerabilities) @@ -747,7 +760,7 @@ def test_install_vulnerable_package_when_agent_down(self, host_manager, request, errors_environment = check_errors_in_environment( host_manager, expected_errors=VULNERABILITY_DETECTION_E2E_EXPECTED_ERRORS, - greater_than_timestamp=test_timestamp, + greater_than_timestamp=test_timestamp, error_levels=['ERROR','CRITICAL'] ) test_result.validate_check("no_errors", [Evidence("error_level_messages", errors_environment)]) @@ -796,8 +809,10 @@ def test_change_agent_manager(self, permutate_agents_managers, request, precondi time.sleep(VD_E2E_TIMEOUT_SYSCOLLECTOR_SCAN + PACKAGE_VULNERABILITY_SCAN_TIME * len(AGENTS_SCANNED_FIRST_SCAN)) package_data = [body["package"]] + max_result_window(host_manager) - vulnerabilities = get_vulnerabilities_index(host_manager, AGENTS_SCANNED_FIRST_SCAN, package_data) + vulnerabilities = get_vulnerabilities_index(host_manager, AGENTS_SCANNED_FIRST_SCAN, package_data, + size=INDEXER_RESULT_WINDOWS_VULN_E2E) expected_vulnerabilities = get_expected_index(host_manager, AGENTS_SCANNED_FIRST_SCAN, body["operation"], body["package"]) @@ -872,7 +887,7 @@ def test_change_agent_manager(self, permutate_agents_managers, request, precondi errors_environment = check_errors_in_environment( host_manager, expected_errors=VULNERABILITY_DETECTION_E2E_EXPECTED_ERRORS, - greater_than_timestamp=test_timestamp, + greater_than_timestamp=test_timestamp, error_levels=['ERROR','CRITICAL'] ) test_result.validate_check("no_errors", [Evidence("error_level_messages", errors_environment)]) @@ -928,8 +943,10 @@ def test_vulnerability_detector_scans_cases(self, request, preconditions, body, package_data = [body["package"]["to"], body["package"]["from"]] else: package_data = [body["package"]] + max_result_window(host_manager) - vulnerabilities = get_vulnerabilities_index(host_manager, AGENTS_SCANNED_FIRST_SCAN, package_data) + vulnerabilities = get_vulnerabilities_index(host_manager, AGENTS_SCANNED_FIRST_SCAN, package_data, + size=INDEXER_RESULT_WINDOWS_VULN_E2E) expected_vulnerabilities = get_expected_index(host_manager, AGENTS_SCANNED_FIRST_SCAN, body["operation"], body["package"]) duplicated_vulnerabilities = get_duplicated_vulnerabilities(vulnerabilities) @@ -1001,7 +1018,7 @@ def test_vulnerability_detector_scans_cases(self, request, preconditions, body, errors_environment = check_errors_in_environment( host_manager, expected_errors=VULNERABILITY_DETECTION_E2E_EXPECTED_ERRORS, - greater_than_timestamp=test_timestamp, + greater_than_timestamp=test_timestamp, error_levels=['ERROR','CRITICAL'] ) test_result.validate_check("no_errors", [Evidence("error_level_messages", errors_environment)]) From e3a5cec8275f236e6536493fda4101682a2fc465 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Rebollo=20P=C3=A9rez?= Date: Tue, 3 Sep 2024 17:57:50 +0100 Subject: [PATCH 05/34] feat: include extend windows in indexer api module --- .../wazuh_testing/end_to_end/indexer_api.py | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/deps/wazuh_testing/wazuh_testing/end_to_end/indexer_api.py b/deps/wazuh_testing/wazuh_testing/end_to_end/indexer_api.py index 4167f12b00..d13cf54726 100644 --- a/deps/wazuh_testing/wazuh_testing/end_to_end/indexer_api.py +++ b/deps/wazuh_testing/wazuh_testing/end_to_end/indexer_api.py @@ -177,3 +177,36 @@ def delete_index(host_manager: HostManager, credentials: dict = {'user': 'admin' requests.delete(url=url, verify=False, auth=requests.auth.HTTPBasicAuth(credentials['user'], credentials['password']), headers=headers) + + +def extend_result_window(host_manager: HostManager, credentials: dict = {'user': 'admin', 'password': 'changeme'}, + index: str = 'wazuh-alerts*', new_max_result_window: int = 100000): + """Extend the max_result_window setting for a Wazuh Indexer index. + + Args: + host_manager: An instance of the HostManager class containing information about hosts. + credentials (Optional): A dictionary containing the Indexer credentials. Defaults to + {'user': 'admin', 'password': 'changeme'}. + index (Optional): The Indexer index name. Defaults to 'wazuh-alerts*'. + new_max_result_window (Optional): The new maximum result window size. Defaults to 100,000. + """ + logging.info(f"Extending max_result_window for {index} index to {new_max_result_window}") + + url = f"https://{host_manager.get_master_ip()}:9200/{index}/_settings" + headers = { + 'Content-Type': 'application/json', + } + data = { + "index": { + "max_result_window": new_max_result_window + } + } + + response = requests.put(url=url, json=data, verify=False, + auth=requests.auth.HTTPBasicAuth(credentials['user'], credentials['password']), + headers=headers) + + if response.status_code == 200: + logging.info(f"Successfully updated max_result_window for {index} index.") + else: + logging.error(f"Failed to update max_result_window for {index} index. Response: {response.text}") \ No newline at end of file From d543627880ddd563d83a7ab2f390bf66ebec082d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Rebollo=20P=C3=A9rez?= Date: Tue, 3 Sep 2024 18:02:37 +0100 Subject: [PATCH 06/34] fix: revert error level change --- .../test_vulnerability_detector.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/end_to_end/test_vulnerability_detector/test_vulnerability_detector.py b/tests/end_to_end/test_vulnerability_detector/test_vulnerability_detector.py index 1005f7f5c4..e769ac515a 100644 --- a/tests/end_to_end/test_vulnerability_detector/test_vulnerability_detector.py +++ b/tests/end_to_end/test_vulnerability_detector/test_vulnerability_detector.py @@ -380,7 +380,7 @@ def test_first_syscollector_scan( logging.critical("Checking for errors in the environment") unexpected_errors = check_errors_in_environment( - host_manager, expected_errors=VULNERABILITY_DETECTION_E2E_EXPECTED_ERRORS, error_levels=['ERROR', 'CRITICAL'] + host_manager, expected_errors=VULNERABILITY_DETECTION_E2E_EXPECTED_ERRORS ) test_result.validate_check( @@ -533,7 +533,7 @@ def test_syscollector_second_scan( unexpected_errors = check_errors_in_environment( host_manager, expected_errors=VULNERABILITY_DETECTION_E2E_EXPECTED_ERRORS, - greater_than_timestamp=get_timestamp, error_levels=['ERROR','CRITICAL'] + greater_than_timestamp=get_timestamp ) test_result.validate_check( @@ -760,7 +760,7 @@ def test_install_vulnerable_package_when_agent_down(self, host_manager, request, errors_environment = check_errors_in_environment( host_manager, expected_errors=VULNERABILITY_DETECTION_E2E_EXPECTED_ERRORS, - greater_than_timestamp=test_timestamp, error_levels=['ERROR','CRITICAL'] + greater_than_timestamp=test_timestamp ) test_result.validate_check("no_errors", [Evidence("error_level_messages", errors_environment)]) @@ -887,7 +887,7 @@ def test_change_agent_manager(self, permutate_agents_managers, request, precondi errors_environment = check_errors_in_environment( host_manager, expected_errors=VULNERABILITY_DETECTION_E2E_EXPECTED_ERRORS, - greater_than_timestamp=test_timestamp, error_levels=['ERROR','CRITICAL'] + greater_than_timestamp=test_timestamp ) test_result.validate_check("no_errors", [Evidence("error_level_messages", errors_environment)]) @@ -1018,7 +1018,7 @@ def test_vulnerability_detector_scans_cases(self, request, preconditions, body, errors_environment = check_errors_in_environment( host_manager, expected_errors=VULNERABILITY_DETECTION_E2E_EXPECTED_ERRORS, - greater_than_timestamp=test_timestamp, error_levels=['ERROR','CRITICAL'] + greater_than_timestamp=test_timestamp ) test_result.validate_check("no_errors", [Evidence("error_level_messages", errors_environment)]) From 11e783c36b83f72b5af4453cfba830070c912699 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Rebollo=20P=C3=A9rez?= Date: Wed, 4 Sep 2024 10:46:11 +0100 Subject: [PATCH 07/34] docs: include 5712 changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 991299ed9f..5eb8fcbfc5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ All notable changes to this project will be documented in this file. - Added support for macOS 14.6 to the Allocation module (Vagrant) ([#5671](https://github.com/wazuh/wazuh-qa/pull/5671)) \- (Framework) +### Fixed + +- Increase results windows in E2E Vulnerability detection ([#5712](https://github.com/wazuh/wazuh-qa/pull/5712/)) \- (Framework + Tests) + ## [4.9.0] - TBD ### Added From 50b5adf29605c64653002ce7f2022e868cd96157 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Rebollo=20P=C3=A9rez?= Date: Wed, 4 Sep 2024 11:06:27 +0100 Subject: [PATCH 08/34] docs: update docstring with size parameter --- .../wazuh_testing/end_to_end/vulnerability_detector.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/deps/wazuh_testing/wazuh_testing/end_to_end/vulnerability_detector.py b/deps/wazuh_testing/wazuh_testing/end_to_end/vulnerability_detector.py index 1e0c8eea04..adf303c63d 100644 --- a/deps/wazuh_testing/wazuh_testing/end_to_end/vulnerability_detector.py +++ b/deps/wazuh_testing/wazuh_testing/end_to_end/vulnerability_detector.py @@ -283,6 +283,8 @@ def get_vulnerabilities_from_states_by_agent(host_manager: HostManager, agents: host_manager (HostManager): Host manager object. agents (list): List of agents. greater_than_timestamp (str, optional): Greater than timestamp. Defaults to None. + size (int, optional): Maximun number of vulnerabilities to collect. + More information in https://opensearch.org/docs/latest/search-plugins/searching-data/paginate Returns: dict: Dictionary of vulnerabilities by agent. From 842bbec49b140bd493c5a407ca8386f12e78c9e4 Mon Sep 17 00:00:00 2001 From: fcaffieri Date: Thu, 5 Sep 2024 18:07:00 -0300 Subject: [PATCH 09/34] Remove cleanup.yml --- deployability/modules/testing/main.py | 1 - deployability/modules/testing/models.py | 1 - .../modules/testing/playbooks/cleanup.yml | 11 ------- deployability/modules/testing/testing.py | 32 +++---------------- 4 files changed, 5 insertions(+), 40 deletions(-) delete mode 100644 deployability/modules/testing/playbooks/cleanup.yml diff --git a/deployability/modules/testing/main.py b/deployability/modules/testing/main.py index 2c9988971d..2c7520838b 100755 --- a/deployability/modules/testing/main.py +++ b/deployability/modules/testing/main.py @@ -18,7 +18,6 @@ def parse_arguments(): parser.add_argument("--tests", required=True) parser.add_argument("--component", choices=['manager', 'agent', 'central_components'], required=True) parser.add_argument("--dependencies", action='append', default=[], required=False) - parser.add_argument("--cleanup", required=False, default=True) parser.add_argument("--wazuh-version", required=True) parser.add_argument("--wazuh-revision", required=True) parser.add_argument("--wazuh-branch", required=False) diff --git a/deployability/modules/testing/models.py b/deployability/modules/testing/models.py index 522ce9e07b..d8d6fc0c5e 100644 --- a/deployability/modules/testing/models.py +++ b/deployability/modules/testing/models.py @@ -19,7 +19,6 @@ class InputPayload(ExtraVars): tests: list[str] targets: list[str] dependencies: list[str] | None = None - cleanup: bool = True live: bool = False diff --git a/deployability/modules/testing/playbooks/cleanup.yml b/deployability/modules/testing/playbooks/cleanup.yml deleted file mode 100644 index 880d28c86e..0000000000 --- a/deployability/modules/testing/playbooks/cleanup.yml +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright (C) 2015, Wazuh Inc. -# Created by Wazuh, Inc. . -# This program is a free software; you can redistribute it and/or modify it under the terms of GPLv2 - -- hosts: localhost - become: true - tasks: - - name: Clean test directory - file: - path: "{{ working_dir }}" - state: absent diff --git a/deployability/modules/testing/testing.py b/deployability/modules/testing/testing.py index 0522ae4ef6..67aee5632c 100644 --- a/deployability/modules/testing/testing.py +++ b/deployability/modules/testing/testing.py @@ -15,7 +15,6 @@ class Tester: _playbooks_dir = Path(__file__).parent / 'playbooks' _setup_playbook = _playbooks_dir / 'setup.yml' - _cleanup_playbook = _playbooks_dir / 'cleanup.yml' _test_template = _playbooks_dir / 'test.yml' @classmethod @@ -60,14 +59,6 @@ def run(cls, payload: InputPayload) -> None: cls._setup(ansible, extra_vars) cls._run_tests(payload.tests, ansible, extra_vars) - # Clean up if required - if payload.cleanup: - for target_path in payload.targets: - target_value = eval(target_path).values() - target_inventory = Inventory(**Utils.load_from_yaml(str(list(target_value)[0]))) - logger.info("Cleaning up") - cls._cleanup(ansible, extra_vars['working_dir']) - @classmethod def _get_extra_vars(cls, payload: InputPayload) -> ExtraVars: """ @@ -96,13 +87,13 @@ def _run_tests(cls, test_list: list[str], ansible: Ansible, extra_vars: ExtraVar rendering_var = {**extra_vars, 'test': test} template = str(cls._test_template) result = ansible.run_playbook(template, rendering_var) + for event in result.events: - logger.info(f"{event['stdout']}") - if result.stats["failures"]: - for event in result.events: + if result.stats["failures"]: if "fatal" in event['stdout']: - raise Exception(f"Test {test} failed with error") - + raise Exception(f"Test {test} failed with error: {event['stdout']}") + else: + logger.info(f"Test {test} Finished with: {event['stdout']}") @classmethod def _setup(cls, ansible: Ansible, extra_vars: ExtraVars) -> None: @@ -120,16 +111,3 @@ def _setup(cls, ansible: Ansible, extra_vars: ExtraVars) -> None: if "fatal" in event['stdout']: raise Exception(f"Setup {template} failed with error: {event['stdout']}") - - @classmethod - def _cleanup(cls, ansible: Ansible, remote_working_dir: str = '/tmp') -> None: - """ - Cleanup the environment after the tests. - - Args: - ansible (Ansible): The Ansible object to run the cleanup. - remote_working_dir (str): The remote working directory. - """ - extra_vars = {'working_dir': remote_working_dir} - playbook = str(cls._cleanup_playbook) - ansible.run_playbook(playbook, extra_vars) From 9e388bdc489d69b08ca5c2c59675d23ecd997974 Mon Sep 17 00:00:00 2001 From: GGP1 Date: Tue, 10 Sep 2024 11:39:41 -0300 Subject: [PATCH 10/34] fix: Remove change log --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d155161e1..89a80833ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -102,7 +102,6 @@ s - Added tests for checking agent status upon ungraceful closure.([#4146](https://github.com/wazuh/wazuh-qa/pull/4146)) \- (Tests) - Agent syncronization testing after group deleting ([#4143](https://github.com/wazuh/wazuh-qa/pull/4143)) \- (Tests) - Add test for AWS Custom Logs. ([#4675](https://github.com/wazuh/wazuh-qa/pull/4675)) \- (Tests) -- Add new behaviour for endpoints marked as xfail in api_endpoints_performance test ([#4657](https://github.com/wazuh/wazuh-qa/pull/4657)) \ (Tests) ### Changed From c843dd6f9de4d4d73aa0fabeb88e251a9074c0be Mon Sep 17 00:00:00 2001 From: GGP1 Date: Tue, 10 Sep 2024 11:41:05 -0300 Subject: [PATCH 11/34] fix: Revert test changes --- .../test_api_endpoints_performance.py | 23 +++++-------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/tests/performance/test_api/test_api_endpoints_performance.py b/tests/performance/test_api/test_api_endpoints_performance.py index 4185be1a91..629c596e2d 100755 --- a/tests/performance/test_api/test_api_endpoints_performance.py +++ b/tests/performance/test_api/test_api_endpoints_performance.py @@ -2,7 +2,6 @@ from os.path import join, dirname, realpath from time import sleep -import warnings import pytest import requests from yaml import safe_load @@ -33,6 +32,12 @@ def test_api_endpoints(test_case, set_api_test_environment, api_healthcheck): set_api_test_environment (fixture): Fixture that modifies the API security options. api_healthcheck (fixture): Fixture used to check that the API is ready to respond requests. """ + # Apply xfails + if test_case['endpoint'] in xfailed_items.keys() and \ + test_case['method'] == xfailed_items[test_case['endpoint']]['method']: + pytest.xfail(xfailed_items[test_case['endpoint']]['message']) + + base_url = api_details['base_url'] headers = api_details['auth_headers'] response = None @@ -44,21 +49,6 @@ def test_api_endpoints(test_case, set_api_test_environment, api_healthcheck): assert response.status_code == 200 assert response.json()['error'] == 0 - except AssertionError as e: - # If the assertion fails, and is marked as xfail - if test_case['endpoint'] in xfailed_items.keys() and \ - test_case['method'] == xfailed_items[test_case['endpoint']]['method']: - pytest.xfail(xfailed_items[test_case['endpoint']]['message']) - - raise e - - else: - # If the test does not fail and is marked as xfail, issue a warning - if test_case['endpoint'] in xfailed_items.keys() and \ - test_case['method'] == xfailed_items[test_case['endpoint']]['method']: - warnings.warn(f"Test {test_case['endpoint']} should have failed due " - f"to {xfailed_items[test_case['endpoint']]['message']}") - finally: # Add useful information to report as stdout try: @@ -68,6 +58,5 @@ def test_api_endpoints(test_case, set_api_test_environment, api_healthcheck): except KeyError: print('No response available') - # Restart logic as before if test_case['method'] == 'put' and test_case['restart']: sleep(restart_delay) From fe54819c35319d3659aac9cb24857018018f2f14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Santiago=20Padilla=20=C3=81lvarez?= Date: Wed, 11 Sep 2024 12:59:37 +0200 Subject: [PATCH 12/34] fix: temporary elimination of agents for testing --- .../e2e_vulnerability_detector.yaml | 33 ------------------- 1 file changed, 33 deletions(-) diff --git a/provisioning/environments/e2e_vulnerability_detector.yaml b/provisioning/environments/e2e_vulnerability_detector.yaml index f0fe3aff01..91904bb054 100644 --- a/provisioning/environments/e2e_vulnerability_detector.yaml +++ b/provisioning/environments/e2e_vulnerability_detector.yaml @@ -3,40 +3,7 @@ manager1: os: ubuntu_22 type: master -manager2: - roles: [manager, filebeat] - os: ubuntu_22 - type: worker - agent1: - roles: [agent] - os: centos_7 - manager: manager1 - -agent2: - roles: [agent] - os: windows_11 - manager: manager2 - -agent3: - roles: [agent] - os: ubuntu_22 - manager: manager1 - -agent4: - roles: [agent] - os: centos_7 - manager: manager1 - architecture: arm64v8 - -agent5: roles: [agent] os: ubuntu_22 - manager: manager2 - architecture: arm64v8 - -agent6: - roles: [agent] - os: macos_1400 manager: manager1 - architecture: arm64v8 From ceed223d7917e51007f0792b9f8599a029ee8b68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Santiago=20Padilla=20=C3=81lvarez?= Date: Wed, 11 Sep 2024 16:07:17 +0200 Subject: [PATCH 13/34] fix: add offline-url element --- .../test_vulnerability_detector/configurations/manager.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/end_to_end/test_vulnerability_detector/configurations/manager.yaml b/tests/end_to_end/test_vulnerability_detector/configurations/manager.yaml index 9f2497a2c7..98ce713dd1 100644 --- a/tests/end_to_end/test_vulnerability_detector/configurations/manager.yaml +++ b/tests/end_to_end/test_vulnerability_detector/configurations/manager.yaml @@ -7,6 +7,8 @@ value: 'yes' - feed-update-interval: value: 10h + - offline-url: + value: 'https://localhost' - section: indexer elements: - enabled: From 595a2479093b4bb3efe180d340886406cefa87a0 Mon Sep 17 00:00:00 2001 From: c-bordon Date: Wed, 11 Sep 2024 13:24:31 -0300 Subject: [PATCH 14/34] Updated Debian 12 AMIs and Box to 12.7 version --- deployability/modules/allocation/static/specs/os.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deployability/modules/allocation/static/specs/os.yml b/deployability/modules/allocation/static/specs/os.yml index 6a351b744f..4db94ad76d 100644 --- a/deployability/modules/allocation/static/specs/os.yml +++ b/deployability/modules/allocation/static/specs/os.yml @@ -35,7 +35,7 @@ vagrant: virtualizer: virtualbox linux-debian-12-amd64: box: debian/bookworm64 - box_version: 12.20231211.1 + box_version: 12.20240905.1 virtualizer: virtualbox # Oracle Linux linux-oracle-7-amd64: @@ -268,11 +268,11 @@ aws: zone: us-east-1 user: admin linux-debian-12-amd64: - ami: ami-055c8118725fe3a84 + ami: ami-014124f30c18be425 zone: us-east-1 user: admin linux-debian-12-arm64: - ami: ami-06703877c23c4ddf1 + ami: ami-027a194fc587a2e82 zone: us-east-1 user: admin # Oracle Linux @@ -422,7 +422,7 @@ aws: zone: us-east-1 user: ec2-user macos-ventura-13-arm64: - ami: ami-01aa3973cdaf40134 + ami: ami-01aa3973cdaf40134 zone: us-east-1 user: ec2-user macos-sonoma-14-amd64: From cb27e54f457ea8941e9ebf1984329c7522c84813 Mon Sep 17 00:00:00 2001 From: c-bordon Date: Wed, 11 Sep 2024 13:30:20 -0300 Subject: [PATCH 15/34] Changelog updated --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d155161e1..201f98b2cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ All notable changes to this project will be documented in this file. ### Changed +- Updated Debian 12 AMIs and Box to 12.7 version ([#5735](https://github.com/wazuh/wazuh-qa/pull/5735)) \- (Framework) - Increase Feed update timeout in waiters.py ([#5668](https://github.com/wazuh/wazuh-qa/pull/5668)) \- (Framework) - Set `/active-response` as xfail ([#5660](https://github.com/wazuh/wazuh-qa/pull/5660)) \- (Tests) - Modify the directory name for machines deployed in AWS ([#5635](https://github.com/wazuh/wazuh-qa/pull/5635)) \- (Framework) From a5a769a5bf79afb61565b50deb0d19523010700d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Santiago=20Padilla=20=C3=81lvarez?= Date: Wed, 11 Sep 2024 21:50:39 +0200 Subject: [PATCH 16/34] fix: reestablish all agents --- .../e2e_vulnerability_detector.yaml | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/provisioning/environments/e2e_vulnerability_detector.yaml b/provisioning/environments/e2e_vulnerability_detector.yaml index 91904bb054..f0fe3aff01 100644 --- a/provisioning/environments/e2e_vulnerability_detector.yaml +++ b/provisioning/environments/e2e_vulnerability_detector.yaml @@ -3,7 +3,40 @@ manager1: os: ubuntu_22 type: master +manager2: + roles: [manager, filebeat] + os: ubuntu_22 + type: worker + agent1: + roles: [agent] + os: centos_7 + manager: manager1 + +agent2: + roles: [agent] + os: windows_11 + manager: manager2 + +agent3: + roles: [agent] + os: ubuntu_22 + manager: manager1 + +agent4: + roles: [agent] + os: centos_7 + manager: manager1 + architecture: arm64v8 + +agent5: roles: [agent] os: ubuntu_22 + manager: manager2 + architecture: arm64v8 + +agent6: + roles: [agent] + os: macos_1400 manager: manager1 + architecture: arm64v8 From c1228c3c65f181a661e69855808f6d59b53844b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Santiago=20Padilla=20=C3=81lvarez?= Date: Thu, 12 Sep 2024 09:37:11 +0200 Subject: [PATCH 17/34] fix: temporary removal of agents for testing --- .../e2e_vulnerability_detector.yaml | 33 ------------------- 1 file changed, 33 deletions(-) diff --git a/provisioning/environments/e2e_vulnerability_detector.yaml b/provisioning/environments/e2e_vulnerability_detector.yaml index f0fe3aff01..91904bb054 100644 --- a/provisioning/environments/e2e_vulnerability_detector.yaml +++ b/provisioning/environments/e2e_vulnerability_detector.yaml @@ -3,40 +3,7 @@ manager1: os: ubuntu_22 type: master -manager2: - roles: [manager, filebeat] - os: ubuntu_22 - type: worker - agent1: - roles: [agent] - os: centos_7 - manager: manager1 - -agent2: - roles: [agent] - os: windows_11 - manager: manager2 - -agent3: - roles: [agent] - os: ubuntu_22 - manager: manager1 - -agent4: - roles: [agent] - os: centos_7 - manager: manager1 - architecture: arm64v8 - -agent5: roles: [agent] os: ubuntu_22 - manager: manager2 - architecture: arm64v8 - -agent6: - roles: [agent] - os: macos_1400 manager: manager1 - architecture: arm64v8 From 189bd237e0682640e08184401387f7d6648476be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20Sergio=20Garc=C3=ADa=20Ib=C3=A1=C3=B1ez?= Date: Thu, 12 Sep 2024 16:22:36 +0200 Subject: [PATCH 18/34] Update data_visualizations.py and visualization.py --- .../scripts/data_visualizations.py | 2 + .../tools/performance/visualization.py | 64 +++++++++++++------ 2 files changed, 45 insertions(+), 21 deletions(-) diff --git a/deps/wazuh_testing/wazuh_testing/scripts/data_visualizations.py b/deps/wazuh_testing/wazuh_testing/scripts/data_visualizations.py index 85a9c195c0..64a1ac5902 100644 --- a/deps/wazuh_testing/wazuh_testing/scripts/data_visualizations.py +++ b/deps/wazuh_testing/wazuh_testing/scripts/data_visualizations.py @@ -52,6 +52,7 @@ def get_script_arguments(): help=f'Path to Json with Columns to Plot. Default {None}.') parser.add_argument('-u', '--unify', dest='unify', action='store_true', help='Unify data of the binary processes with their subprocesses to plot.') + parser.add_argument('-x', help="Title of the generated chart, add extra info here.", type=str, dest='plot_title') return parser.parse_args() @@ -67,6 +68,7 @@ def main(): 'dataframes_paths': options.csv_list, 'store_path': options.destination, 'base_name': options.name + 'plot_title': options.plot_title } strategy = target diff --git a/deps/wazuh_testing/wazuh_testing/tools/performance/visualization.py b/deps/wazuh_testing/wazuh_testing/tools/performance/visualization.py index 6ae2a0df2f..0714793334 100644 --- a/deps/wazuh_testing/wazuh_testing/tools/performance/visualization.py +++ b/deps/wazuh_testing/wazuh_testing/tools/performance/visualization.py @@ -20,19 +20,22 @@ class DataVisualizer(ABC): dataframe (pandas.Dataframe): dataframe containing the info from all the CSVs. store_path (str): path to store the CSV images. Defaults to the temp directory. base_name (str, optional): base name used to store the images. + plot_title (str, optional): Title for the generated plots. """ - def __init__(self, dataframes_paths, store_path=gettempdir(), base_name=None): + def __init__(self, dataframes_paths, store_path=gettempdir(), base_name=None, plot_title=None): """Initializes the DataVisualizer. Args: dataframes_paths (list): List of paths to CSV files. store_path (str, optional): Path to store the CSV images. Defaults to the temp directory. base_name (str, optional): Base name used to store the images. + plot_title (str, optional): Title for the generated plots. """ self.dataframes_paths = dataframes_paths self.store_path = store_path self.base_name = base_name + self.plot_title = plot_title self.dataframe = pd.DataFrame() self._load_dataframes() @@ -198,6 +201,7 @@ class BinaryDatavisualizer(DataVisualizer): dataframe (pandas.Dataframe): dataframe containing the info from all the CSVs. store_path (str): path to store the CSV images. Defaults to the temp directory. base_name (str, optional): base name used to store the images. + plot_title (str, optional): Title for the generated plots. binary_metrics_fields_to_plot (list): List of binary metrics fields to plot. binary_metrics_extra_fields (list): List of additional binary metrics fields. binary_metrics_fields (list): Combined list of binary metrics fields. @@ -209,16 +213,17 @@ class BinaryDatavisualizer(DataVisualizer): binary_metrics_extra_fields = ["Daemon", "Version", "PID"] binary_metrics_fields = binary_metrics_fields_to_plot + binary_metrics_extra_fields - def __init__(self, dataframes_paths, store_path=gettempdir(), base_name=None, unify_child_daemon_metrics=False): + def __init__(self, dataframes_paths, store_path=gettempdir(), base_name=None, unify_child_daemon_metrics=False, plot_title=None): """Initialize the BinaryDatavisualizer. Args: dataframes (list): List of dataframes containing binary metrics data. store_path (str, optional): Path to store visualizations. Defaults to system temp directory. base_name (str, optional): Base name for saved visualizations. Defaults to None. + plot_title (str, optional): Title for the generated plots. unify_child_daemon_metrics (bool, optional): Whether to unify child daemon metrics. Defaults to False. """ - super().__init__(dataframes_paths, store_path, base_name) + super().__init__(dataframes_paths, store_path, base_name, plot_title) self._validate_dataframe() if unify_child_daemon_metrics: self.dataframe = self.dataframe.reset_index(drop=False) @@ -302,6 +307,7 @@ def plot(self): This method creates and saves plots for each binary metric field. """ + p_title = self.plot_title.replace('<>', ' ') columns_to_plot = self._get_fields_to_plot() for element in columns_to_plot: _, ax = plt.subplots() @@ -311,7 +317,7 @@ def plot(self): self._basic_plot(ax, self.dataframe[self.dataframe.Daemon == daemon][element], label=daemon, color=color) - self._save_custom_plot(ax, element, element) + self._save_custom_plot(ax, element, p_title) class DaemonStatisticsVisualizer(DataVisualizer): @@ -322,6 +328,7 @@ class DaemonStatisticsVisualizer(DataVisualizer): dataframe (pandas.Dataframe): dataframe containing the info from all the CSVs. store_path (str): path to store the CSV images. Defaults to the temp directory. base_name (str, optional): base name used to store the images. + plot_title (str, optional): Title for the generated plots. daemon (str): Name of the daemon for which statistics are visualized. plots_data (dict): Data required for plotting statistics. expected_fields (list): List of expected fields for the daemon statistics. @@ -331,17 +338,18 @@ class DaemonStatisticsVisualizer(DataVisualizer): statistics_plot_data_directory = join(dirname(realpath(__file__)), '..', '..', 'data', 'data_visualizer') statistics_filename_suffix = '_csv_headers.json' - def __init__(self, dataframes_paths, daemon, store_path=gettempdir(), base_name=None): + def __init__(self, dataframes_paths, daemon, store_path=gettempdir(), base_name=None, plot_title=None): """Initialize the DaemonStatisticsVisualizer. Args: dataframes (list): List of dataframes containing daemon statistics data. daemon (str): Name of the daemon for which statistics are visualized. store_path (str, optional): Path to store visualizations. Defaults to system temp directory. + plot_title (str, optional): Title for the generated plots. base_name (str, optional): Base name for saved visualizations. Defaults to None. """ self.daemon = daemon - super().__init__(dataframes_paths, store_path, base_name) + super().__init__(dataframes_paths, store_path, base_name, plot_title) self.plots_data = self._load_plot_data() self.expected_fields = [] for graph in self.plots_data.values(): @@ -383,6 +391,7 @@ def plot(self): This method creates and saves plots for each statistic field. """ + p_title = self.plot_title.replace('<>', ' ') for element in self.plots_data.values(): columns = element['columns'] title = element['title'] @@ -391,7 +400,7 @@ def plot(self): _, ax = plt.subplots() for column, color in zip(columns, colors): self._basic_plot(ax, self.dataframe[column], label=column, color=color) - self._save_custom_plot(ax, title, title) + self._save_custom_plot(ax, title, p_title) class LogcollectorStatisticsVisualizer(DaemonStatisticsVisualizer): @@ -402,19 +411,21 @@ class LogcollectorStatisticsVisualizer(DaemonStatisticsVisualizer): dataframe (pandas.Dataframe): dataframe containing the info from all the CSVs. store_path (str): path to store the CSV images. Defaults to the temp directory. base_name (str, optional): base name used to store the images. + plot_title (str, optional): Title for the generated plots. general_fields (list): List of general fields for logcollector statistics. """ general_fields = ['Location', 'Target'] - def __init__(self, dataframes_paths, store_path=gettempdir(), base_name=None): + def __init__(self, dataframes_paths, store_path=gettempdir(), base_name=None, plot_title=None): """Initialize the LogcollectorStatisticsVisualizer. Args: dataframes (list): List of dataframes containing logcollector statistics data. store_path (str, optional): Path to store visualizations. Defaults to system temp directory. base_name (str, optional): Base name for saved visualizations. Defaults to None. + plot_title (str, optional): Title for the generated plots. """ - super().__init__(dataframes_paths, 'logcollector', store_path, base_name) + super().__init__(dataframes_paths, 'logcollector', store_path, base_name, plot_title) def _get_expected_fields(self): """Get the list of expected fields for logcollector statistics. @@ -437,6 +448,7 @@ def plot(self): This method creates and saves plots for each logcollector target. """ + p_title = self.plot_title.replace('<>', ' ') for element in self.plots_data.values(): _, ax = plt.subplots() targets = self._get_logcollector_location() @@ -445,7 +457,7 @@ def plot(self): self._basic_plot(ax, self.dataframe[self.dataframe.Location == target][element['columns']], label=target, color=color) - self._save_custom_plot(ax, element['title'], element['title']) + self._save_custom_plot(ax, element['title'], p_title) class ClusterStatisticsVisualizer(DataVisualizer): @@ -456,19 +468,21 @@ class ClusterStatisticsVisualizer(DataVisualizer): dataframe (pandas.Dataframe): dataframe containing the info from all the CSVs. store_path (str): path to store the CSV images. Defaults to the temp directory. base_name (str, optional): base name used to store the images. + plot_title (str, optional): Title for the generated plots. expected_cluster_fields (list): List of expected fields for cluster statistics. """ expected_cluster_fields = ['node_name', 'activity', 'time_spent(s)'] - def __init__(self, dataframes_paths, store_path=gettempdir(), base_name=None): + def __init__(self, dataframes_paths, store_path=gettempdir(), base_name=None, plot_title=None): """Initialize the ClusterStatisticsVisualizer. Args: dataframes_paths (list): List of paths to dataframes containing cluster statistics data. store_path (str, optional): Path to store visualizations. Defaults to system temp directory. + plot_title (str, optional): Title for the generated plots. base_name (str, optional): Base name for saved visualizations. Defaults to None. """ - super().__init__(dataframes_paths, store_path, base_name) + super().__init__(dataframes_paths, store_path, base_name, plot_title) self._validate_dataframe() def _get_expected_fields(self) -> list: @@ -485,7 +499,8 @@ def plot(self): This method creates and saves plots for each cluster activity. """ elements = list(self.dataframe['activity'].unique()) - + self.base_name = element.replace(' ', '_').lower() + p_title = self.plot_title.replace('<>', ' ') for element in elements: _, ax = plt.subplots() nodes = self.dataframe[self.dataframe.activity == element]['node_name'].unique() @@ -494,7 +509,7 @@ def plot(self): for node, color in zip(nodes, self._color_palette(len(nodes))): self._basic_plot(ax=ax, dataframe=current_df[current_df.node_name == node]['time_spent(s)'], label=node, color=color) - self._save_custom_plot(ax, 'time_spent(s)', element.replace(' ', '_').lower(), disable_x_labels=True, + self._save_custom_plot(ax, 'time_spent(s)', p_title, disable_x_labels=True, statistics=DataVisualizer._get_statistics( current_df['time_spent(s)'], calculate_mean=True, calculate_median=True)) @@ -506,19 +521,21 @@ class IndexerAlerts(DataVisualizer): dataframes_paths (list): paths of the CSVs. dataframe (pandas.Dataframe): dataframe containing the info from all the CSVs. store_path (str): path to store the CSV images. Defaults to the temp directory. + plot_title (str, optional): Title for the generated plots. expected_fields (list): List of expected fields for indexer alerts. """ expected_fields = ['Total alerts'] - def __init__(self, dataframes_paths, store_path=gettempdir(), base_name=None): + def __init__(self, dataframes_paths, store_path=gettempdir(), base_name=None, plot_title=None): """Initialize the IndexerAlerts visualizer. Args: dataframes_paths (list): List of paths to dataframes containing indexer alerts data. store_path (str, optional): Path to store visualizations. Defaults to system temp directory. + plot_title (str, optional): Title for the generated plots. base_name (str, optional): Base name for saved visualizations. Defaults to None. """ - super().__init__(dataframes_paths, store_path, base_name) + super().__init__(dataframes_paths, store_path, base_name, plot_title) self._validate_dataframe() def _get_expected_fields(self): @@ -543,23 +560,25 @@ def _plot_agregated_alerts(self): This method creates and saves a plot for the aggregated alerts. """ + p_title = self.plot_title.replace('<>', ' ') _, ax = plt.subplots() self.dataframe['Difference'] = self.dataframe['Total alerts'].diff() self.dataframe['Difference'] = self.dataframe['Difference'] / self._calculate_timestamp_interval() self._basic_plot(ax=ax, dataframe=self.dataframe['Difference'], label='Alerts per timestamp', color=self._color_palette(1)[0]) - self._save_custom_plot(ax, 'Different alerts', 'Difference alerts') + self._save_custom_plot(ax, 'Different alerts', p_title) def _plot_plain_alerts(self): """Plot the total alerts. This method creates and saves a plot for the total alerts. """ + p_title = self.plot_title.replace('<>', ' ') _, ax = plt.subplots() self._basic_plot(ax=ax, dataframe=self.dataframe['Total alerts'], label='Total alerts', color=self._color_palette(1)[0]) - self._save_custom_plot(ax, 'Total alerts', 'Total alerts') + self._save_custom_plot(ax, 'Total alerts', p_title) def plot(self): """Plot the indexer alerts data. @@ -577,19 +596,21 @@ class IndexerVulnerabilities(DataVisualizer): dataframes_paths (list): paths of the CSVs. dataframe (pandas.Dataframe): dataframe containing the info from all the CSVs. store_path (str): path to store the CSV images. Defaults to the temp directory. + plot_title (str, optional): Title for the generated plots. expected_fields (list): List of expected fields for indexer vulnerabilities. """ expected_fields = ['Total vulnerabilities'] - def __init__(self, dataframes_paths, store_path=gettempdir(), base_name=None): + def __init__(self, dataframes_paths, store_path=gettempdir(), base_name=None, plot_title=None): """Initialize the IndexerVulnerabilities visualizer. Args: dataframes_paths (list): List of paths to dataframes containing indexer vulnerabilities data. store_path (str, optional): Path to store visualizations. Defaults to system temp directory. + plot_title (str, optional): Title for the generated plots. base_name (str, optional): Base name for saved visualizations. Defaults to None. """ - super().__init__(dataframes_paths, store_path, base_name) + super().__init__(dataframes_paths, store_path, base_name, plot_title) self._validate_dataframe() def _get_expected_fields(self): @@ -605,7 +626,8 @@ def plot(self): This method creates and saves a plot for the total vulnerabilities. """ + p_title = self.plot_title.replace('<>', ' ') _, ax = plt.subplots() self._basic_plot(ax=ax, dataframe=self.dataframe['Total vulnerabilities'], label='Indexed Vulnerabilities', color=self._color_palette(1)[0]) - self._save_custom_plot(ax, 'Total Vulnerabilities', 'Total vulnerabilities') + self._save_custom_plot(ax, 'Total Vulnerabilities', p_title) From 9eb691a54c39529ac7198e2e9f85016cd7970422 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20Sergio=20Garc=C3=ADa=20Ib=C3=A1=C3=B1ez?= Date: Thu, 12 Sep 2024 17:15:41 +0200 Subject: [PATCH 19/34] Update data_visualizations.py --- deps/wazuh_testing/wazuh_testing/scripts/data_visualizations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/wazuh_testing/wazuh_testing/scripts/data_visualizations.py b/deps/wazuh_testing/wazuh_testing/scripts/data_visualizations.py index 64a1ac5902..56be65b61a 100644 --- a/deps/wazuh_testing/wazuh_testing/scripts/data_visualizations.py +++ b/deps/wazuh_testing/wazuh_testing/scripts/data_visualizations.py @@ -67,7 +67,7 @@ def main(): visualization_options = { 'dataframes_paths': options.csv_list, 'store_path': options.destination, - 'base_name': options.name + 'base_name': options.name, 'plot_title': options.plot_title } From bfca1be817a6b3f5766f41a9d9035491b48d2625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20Sergio=20Garc=C3=ADa=20Ib=C3=A1=C3=B1ez?= Date: Thu, 12 Sep 2024 18:05:32 +0200 Subject: [PATCH 20/34] Update visualization.py --- .../wazuh_testing/tools/performance/visualization.py | 1 - 1 file changed, 1 deletion(-) diff --git a/deps/wazuh_testing/wazuh_testing/tools/performance/visualization.py b/deps/wazuh_testing/wazuh_testing/tools/performance/visualization.py index 0714793334..6027498774 100644 --- a/deps/wazuh_testing/wazuh_testing/tools/performance/visualization.py +++ b/deps/wazuh_testing/wazuh_testing/tools/performance/visualization.py @@ -499,7 +499,6 @@ def plot(self): This method creates and saves plots for each cluster activity. """ elements = list(self.dataframe['activity'].unique()) - self.base_name = element.replace(' ', '_').lower() p_title = self.plot_title.replace('<>', ' ') for element in elements: _, ax = plt.subplots() From d7b2c8cb9092db574d800c561c1a681f30cc6fa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20Sergio=20Garc=C3=ADa=20Ib=C3=A1=C3=B1ez?= Date: Thu, 12 Sep 2024 19:37:20 +0200 Subject: [PATCH 21/34] Update visualization.py --- .../wazuh_testing/tools/performance/visualization.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deps/wazuh_testing/wazuh_testing/tools/performance/visualization.py b/deps/wazuh_testing/wazuh_testing/tools/performance/visualization.py index 6027498774..f566ffb745 100644 --- a/deps/wazuh_testing/wazuh_testing/tools/performance/visualization.py +++ b/deps/wazuh_testing/wazuh_testing/tools/performance/visualization.py @@ -499,9 +499,12 @@ def plot(self): This method creates and saves plots for each cluster activity. """ elements = list(self.dataframe['activity'].unique()) - p_title = self.plot_title.replace('<>', ' ') + result = self.plot_title.replace("<>", "_").replace(":", "_").replace(",", "") + start = result.find("Version_") + output = result[start:] for element in elements: _, ax = plt.subplots() + p_title = element.replace(' ', '_').lower() + "-" + output nodes = self.dataframe[self.dataframe.activity == element]['node_name'].unique() current_df = self.dataframe[self.dataframe.activity == element] current_df.reset_index(drop=True, inplace=True) From bf94bd56edb5e40cb6288e7bbb79f53b2b157345 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Santiago=20Padilla=20=C3=81lvarez?= Date: Fri, 13 Sep 2024 09:00:37 +0200 Subject: [PATCH 22/34] fix: temporary removal of offline-url for testing --- .../test_vulnerability_detector/configurations/manager.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/end_to_end/test_vulnerability_detector/configurations/manager.yaml b/tests/end_to_end/test_vulnerability_detector/configurations/manager.yaml index 98ce713dd1..9f2497a2c7 100644 --- a/tests/end_to_end/test_vulnerability_detector/configurations/manager.yaml +++ b/tests/end_to_end/test_vulnerability_detector/configurations/manager.yaml @@ -7,8 +7,6 @@ value: 'yes' - feed-update-interval: value: 10h - - offline-url: - value: 'https://localhost' - section: indexer elements: - enabled: From da32a46902366f86a55d357b9b36872829ec6e95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Santiago=20Padilla=20=C3=81lvarez?= Date: Fri, 13 Sep 2024 09:32:26 +0200 Subject: [PATCH 23/34] fix: add offline-url element --- .../test_vulnerability_detector/configurations/manager.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/end_to_end/test_vulnerability_detector/configurations/manager.yaml b/tests/end_to_end/test_vulnerability_detector/configurations/manager.yaml index 9f2497a2c7..98ce713dd1 100644 --- a/tests/end_to_end/test_vulnerability_detector/configurations/manager.yaml +++ b/tests/end_to_end/test_vulnerability_detector/configurations/manager.yaml @@ -7,6 +7,8 @@ value: 'yes' - feed-update-interval: value: 10h + - offline-url: + value: 'https://localhost' - section: indexer elements: - enabled: From a3f44e6e34ebd9cdc488220ac9d1694021d0e28b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Santiago=20Padilla=20=C3=81lvarez?= Date: Fri, 13 Sep 2024 09:38:31 +0200 Subject: [PATCH 24/34] fix: reestablish all agents --- .../e2e_vulnerability_detector.yaml | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/provisioning/environments/e2e_vulnerability_detector.yaml b/provisioning/environments/e2e_vulnerability_detector.yaml index 91904bb054..f0fe3aff01 100644 --- a/provisioning/environments/e2e_vulnerability_detector.yaml +++ b/provisioning/environments/e2e_vulnerability_detector.yaml @@ -3,7 +3,40 @@ manager1: os: ubuntu_22 type: master +manager2: + roles: [manager, filebeat] + os: ubuntu_22 + type: worker + agent1: + roles: [agent] + os: centos_7 + manager: manager1 + +agent2: + roles: [agent] + os: windows_11 + manager: manager2 + +agent3: + roles: [agent] + os: ubuntu_22 + manager: manager1 + +agent4: + roles: [agent] + os: centos_7 + manager: manager1 + architecture: arm64v8 + +agent5: roles: [agent] os: ubuntu_22 + manager: manager2 + architecture: arm64v8 + +agent6: + roles: [agent] + os: macos_1400 manager: manager1 + architecture: arm64v8 From 14e3e5d0c00a0a3b028ebf589623ea8cfa55a70a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Santiago=20Padilla=20=C3=81lvarez?= Date: Fri, 13 Sep 2024 09:40:21 +0200 Subject: [PATCH 25/34] docs: update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d155161e1..0d605440cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ All notable changes to this project will be documented in this file. - Added support for macOS 14.6 to the Allocation module (Vagrant) ([#5671](https://github.com/wazuh/wazuh-qa/pull/5671)) \- (Framework) +### Changed + +- Change in VD E2E tests to use package feed instead of CTI feed ([#5739](https://github.com/wazuh/wazuh-qa/pull/5739)) \- (Tests) + ### Fixed - Increase results windows in E2E Vulnerability detection ([#5712](https://github.com/wazuh/wazuh-qa/pull/5712/)) \- (Framework + Tests) From 5133cc42ed94ec4b62db7be1606e56f9d5c12ed0 Mon Sep 17 00:00:00 2001 From: GGP1 Date: Fri, 13 Sep 2024 08:33:21 -0300 Subject: [PATCH 26/34] fix: Update changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 89a80833ea..928e907120 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ All notable changes to this project will be documented in this file. - Increase results windows in E2E Vulnerability detection ([#5712](https://github.com/wazuh/wazuh-qa/pull/5712/)) \- (Framework + Tests) +### Deleted + +- Reverted an xfail behaviour change in the API performance test ([#5734](https://github.com/wazuh/wazuh-qa/pull/5734)) \ (Tests) + ## [4.9.0] - TBD ### Added @@ -102,6 +106,7 @@ s - Added tests for checking agent status upon ungraceful closure.([#4146](https://github.com/wazuh/wazuh-qa/pull/4146)) \- (Tests) - Agent syncronization testing after group deleting ([#4143](https://github.com/wazuh/wazuh-qa/pull/4143)) \- (Tests) - Add test for AWS Custom Logs. ([#4675](https://github.com/wazuh/wazuh-qa/pull/4675)) \- (Tests) +- Add new behaviour for endpoints marked as xfail in api_endpoints_performance test ([#4657](https://github.com/wazuh/wazuh-qa/pull/4657)) \ (Tests) ### Changed From fa0a37c639d38b8702dcfd2cac07996efd84e7d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20Sergio=20Garc=C3=ADa=20Ib=C3=A1=C3=B1ez?= Date: Fri, 13 Sep 2024 15:47:45 +0200 Subject: [PATCH 27/34] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d155161e1..fa7e52b125 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,9 @@ All notable changes to this project will be documented in this file. - Increase results windows in E2E Vulnerability detection ([#5712](https://github.com/wazuh/wazuh-qa/pull/5712/)) \- (Framework + Tests) +### Changed +- Improve VD plots title ([#5740](https://github.com/wazuh/wazuh-qa/pull/5740)) \- (Framework) + ## [4.9.0] - TBD ### Added From 005e0dda975d5f581bc76ac333ce3a1937e70ce7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20Sergio=20Garc=C3=ADa=20Ib=C3=A1=C3=B1ez?= Date: Mon, 16 Sep 2024 16:57:16 +0200 Subject: [PATCH 28/34] Update CHANGELOG.md --- CHANGELOG.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa7e52b125..bbe053b983 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,12 +8,17 @@ All notable changes to this project will be documented in this file. - Added support for macOS 14.6 to the Allocation module (Vagrant) ([#5671](https://github.com/wazuh/wazuh-qa/pull/5671)) \- (Framework) +### Changed + +- Improve VD plots title ([#5740](https://github.com/wazuh/wazuh-qa/pull/5740)) \- (Framework) + ### Fixed - Increase results windows in E2E Vulnerability detection ([#5712](https://github.com/wazuh/wazuh-qa/pull/5712/)) \- (Framework + Tests) -### Changed -- Improve VD plots title ([#5740](https://github.com/wazuh/wazuh-qa/pull/5740)) \- (Framework) +### Deleted + +- Reverted an xfail behaviour change in the API performance test ([#5734](https://github.com/wazuh/wazuh-qa/pull/5734)) \ (Tests) ## [4.9.0] - TBD From 6dd20c5b6435a86b67ede09567153c00926b023f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20Sergio=20Garc=C3=ADa=20Ib=C3=A1=C3=B1ez?= Date: Mon, 16 Sep 2024 16:58:35 +0200 Subject: [PATCH 29/34] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bbe053b983..58f42ef0bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ All notable changes to this project will be documented in this file. ### Deleted -- Reverted an xfail behaviour change in the API performance test ([#5734](https://github.com/wazuh/wazuh-qa/pull/5734)) \ (Tests) +- Reverted an xfail behaviour change in the API performance test ([#5734](https://github.com/wazuh/wazuh-qa/pull/5734)) \- (Tests) ## [4.9.0] - TBD From 1d748b143a8c195134beacec9912abe577284f45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Santiago=20Padilla=20=C3=81lvarez?= Date: Tue, 17 Sep 2024 12:04:01 +0200 Subject: [PATCH 30/34] fix: temporal remove of agents for testing --- .../e2e_vulnerability_detector.yaml | 33 ------------------- 1 file changed, 33 deletions(-) diff --git a/provisioning/environments/e2e_vulnerability_detector.yaml b/provisioning/environments/e2e_vulnerability_detector.yaml index f0fe3aff01..91904bb054 100644 --- a/provisioning/environments/e2e_vulnerability_detector.yaml +++ b/provisioning/environments/e2e_vulnerability_detector.yaml @@ -3,40 +3,7 @@ manager1: os: ubuntu_22 type: master -manager2: - roles: [manager, filebeat] - os: ubuntu_22 - type: worker - agent1: - roles: [agent] - os: centos_7 - manager: manager1 - -agent2: - roles: [agent] - os: windows_11 - manager: manager2 - -agent3: - roles: [agent] - os: ubuntu_22 - manager: manager1 - -agent4: - roles: [agent] - os: centos_7 - manager: manager1 - architecture: arm64v8 - -agent5: roles: [agent] os: ubuntu_22 - manager: manager2 - architecture: arm64v8 - -agent6: - roles: [agent] - os: macos_1400 manager: manager1 - architecture: arm64v8 From 048e18dd9ab2b82a1e95d39cb6ae47b2e983d090 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Santiago=20Padilla=20=C3=81lvarez?= Date: Tue, 17 Sep 2024 12:06:26 +0200 Subject: [PATCH 31/34] docs: update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d605440cc..0c3b97d0b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ All notable changes to this project will be documented in this file. ### Changed - Change in VD E2E tests to use package feed instead of CTI feed ([#5739](https://github.com/wazuh/wazuh-qa/pull/5739)) \- (Tests) +- Improve VD plots title ([#5740](https://github.com/wazuh/wazuh-qa/pull/5740)) \- (Framework) ### Fixed From 4fb275a6b4f7c95d18000995172c942999f516d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Santiago=20Padilla=20=C3=81lvarez?= Date: Tue, 17 Sep 2024 12:07:30 +0200 Subject: [PATCH 32/34] docs: update changelog --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c3b97d0b7..0d605440cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,6 @@ All notable changes to this project will be documented in this file. ### Changed - Change in VD E2E tests to use package feed instead of CTI feed ([#5739](https://github.com/wazuh/wazuh-qa/pull/5739)) \- (Tests) -- Improve VD plots title ([#5740](https://github.com/wazuh/wazuh-qa/pull/5740)) \- (Framework) ### Fixed From d2a030ebc9f3afe614ad104393d8a8fb559fb14b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Santiago=20Padilla=20=C3=81lvarez?= Date: Tue, 17 Sep 2024 14:09:26 +0200 Subject: [PATCH 33/34] fix: reestablish all agents --- .../e2e_vulnerability_detector.yaml | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/provisioning/environments/e2e_vulnerability_detector.yaml b/provisioning/environments/e2e_vulnerability_detector.yaml index 91904bb054..f0fe3aff01 100644 --- a/provisioning/environments/e2e_vulnerability_detector.yaml +++ b/provisioning/environments/e2e_vulnerability_detector.yaml @@ -3,7 +3,40 @@ manager1: os: ubuntu_22 type: master +manager2: + roles: [manager, filebeat] + os: ubuntu_22 + type: worker + agent1: + roles: [agent] + os: centos_7 + manager: manager1 + +agent2: + roles: [agent] + os: windows_11 + manager: manager2 + +agent3: + roles: [agent] + os: ubuntu_22 + manager: manager1 + +agent4: + roles: [agent] + os: centos_7 + manager: manager1 + architecture: arm64v8 + +agent5: roles: [agent] os: ubuntu_22 + manager: manager2 + architecture: arm64v8 + +agent6: + roles: [agent] + os: macos_1400 manager: manager1 + architecture: arm64v8 From b16ea341f6819354208638583146e1bbf361b4cc Mon Sep 17 00:00:00 2001 From: c-bordon Date: Tue, 17 Sep 2024 11:30:37 -0300 Subject: [PATCH 34/34] Update teams options to the team label --- CHANGELOG.md | 4 ++++ deployability/modules/allocation/aws/provider.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 991299ed9f..a7bfe4cad5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ All notable changes to this project will be documented in this file. - Added support for macOS 14.6 to the Allocation module (Vagrant) ([#5671](https://github.com/wazuh/wazuh-qa/pull/5671)) \- (Framework) +### Changed + +- Update team labels and add 'agent' option ([#5725](https://github.com/wazuh/wazuh-qa/pull/5725)) \- (Framework) + ## [4.9.0] - TBD ### Added diff --git a/deployability/modules/allocation/aws/provider.py b/deployability/modules/allocation/aws/provider.py index e7e9a2ee46..9604b0dd6a 100644 --- a/deployability/modules/allocation/aws/provider.py +++ b/deployability/modules/allocation/aws/provider.py @@ -48,7 +48,7 @@ def _create_instance(cls, base_dir: Path, params: CreationPayload, config: AWSCo temp_id = cls._generate_instance_id(cls.provider_name) temp_dir = base_dir / temp_id credentials = AWSCredentials() - teams = ['qa', 'core', 'framework', 'devops', 'frontend', 'operations', 'cloud', 'threat-intel', 'marketing', 'documentation'] + teams = ['qa', 'cppserver', 'pyserver', 'devops', 'dashboard', 'operations', 'cloud', 'threat-intel', 'marketing', 'documentation', 'agent', 'indexer'] platform = str(params.composite_name.split("-")[0]) arch = str(params.composite_name.split("-")[3]) if not config: