diff --git a/CHANGELOG.md b/CHANGELOG.md index c88a8807f1..c4a286c41e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,7 +26,8 @@ All notable changes to this project will be documented in this file. ### Changed -- Disable debug evidences for Vulnerability Detector E2E tests by default ([#5331](https://github.com/wazuh/wazuh-qa/pull/5331)) \- ( Tests) +- Include new package information from wdb ([#5350](https://github.com/wazuh/wazuh-qa/pull/5350)) \- (Tests) +- Disable debug evidences for Vulnerability Detector E2E tests by default ([#5331](https://github.com/wazuh/wazuh-qa/pull/5331)) \- (Tests) - Include CVE-2023-4822 vulnerability to grafana packages ([#5332](https://github.com/wazuh/wazuh-qa/pull/5332)) \- (Framework) - Remove sslverify from host manager install package method ([#5339](https://github.com/wazuh/wazuh-qa/pull/5339)) \- (Framework) - Include additional Vulnerability Detector E2E tests ([#5287](https://github.com/wazuh/wazuh-qa/pull/5287)) \- (Framework + Tests) @@ -62,6 +63,9 @@ All notable changes to this project will be documented in this file. ### Fixed - Remove false positive from E2E Vulnerability Detection tests ([#5369](https://github.com/wazuh/wazuh-qa/pull/5369)) \- (Framework) +- Fix multigroups guess system test ([#5396](https://github.com/wazuh/wazuh-qa/pull/5396)) \- (Tests) +- Fix hotfixes syscollector agent simulator messages ([#5379](https://github.com/wazuh/wazuh-qa/pull/5379)) \- (Framework) +- Fix restart agent in change manager Vulnerability Detector E2E test case ([#5355](https://github.com/wazuh/wazuh-qa/pull/5355)) \- (Tests) - Fix E2E Vulnerability Detection Windows package installation error ([#5363](https://github.com/wazuh/wazuh-qa/pull/5363)) \- (Framework) - Fix shutdown messages system test ([#5298](https://github.com/wazuh/wazuh-qa/pull/5298)) \- (Framework + Tests) - Fix upgrade macOS package cases for vulnerability scanner E2E ([#5334](https://github.com/wazuh/wazuh-qa/pull/5334)) \- (Tests) diff --git a/deps/wazuh_testing/wazuh_testing/tools/agent_simulator.py b/deps/wazuh_testing/wazuh_testing/tools/agent_simulator.py index e71901527f..735f8b7744 100644 --- a/deps/wazuh_testing/wazuh_testing/tools/agent_simulator.py +++ b/deps/wazuh_testing/wazuh_testing/tools/agent_simulator.py @@ -830,7 +830,7 @@ def __init__(self, agent_name, mq='d', tag='syscollector'): self.syscollector_event_type_mapping = { 'packages': 'dbsync_packages', - 'hotfix': 'dbsync_hotfix', + 'hotfix': 'dbsync_hotfixes', 'hwinfo': 'dbsync_hwinfo', 'ports': 'dbsync_ports', 'osinfo': 'dbsync_osinfo', 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 0be278768d..15e56b9eeb 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 @@ -622,10 +622,19 @@ def permutate_agents_managers(self, host_manager): ) change_agent_manager_ip(host_manager, agent, manager_ip) + # Restart agents to apply the new configuration changes + logging.error("Restarting agents") + host_manager.control_environment("restart", ["agent"], parallel=True) + yield + # Restore the original configuration after tests are done restore_configuration(host_manager, backup_configuration) + # Restart agents again to ensure they reconnect with their original managers + logging.error("Restarting agents") + host_manager.control_environment("restart", ["agent"], parallel=True) + @pytest.mark.parametrize("preconditions, body, teardown", single_vulnerable_case_complete_list, ids=single_vulnerable_case_list_ids,) def test_install_vulnerable_package_when_agent_down(self, host_manager, request, record_property, preconditions, diff --git a/tests/system/test_cluster/test_agent_groups/test_assign_groups_guess.py b/tests/system/test_cluster/test_agent_groups/test_assign_groups_guess.py index 1afb93165a..6dedadd78e 100644 --- a/tests/system/test_cluster/test_agent_groups/test_assign_groups_guess.py +++ b/tests/system/test_cluster/test_agent_groups/test_assign_groups_guess.py @@ -48,6 +48,7 @@ from system import (ERR_MSG_CLIENT_KEYS_IN_MASTER_NOT_FOUND, check_agent_groups, check_keys_file, create_new_agent_group, delete_agent_group, remove_cluster_agents, assign_agent_to_new_group, restart_cluster) +from wazuh_testing import T_10, T_20 from wazuh_testing.tools.system import HostManager from wazuh_testing.tools.file import replace_regex_in_file from wazuh_testing.tools.system_monitoring import HostMonitor @@ -73,8 +74,6 @@ # Variables group_id = 'group_test' multigroups_id = 'default,group_test' -# this timeout is temporality, this test will be update -timeout = 20 # Fixtures @@ -135,7 +134,7 @@ def test_guess_single_group(target_node, status_guess_agent_group, clean_environ ''' # Restart master to apply local internal options restart_cluster([test_infra_managers[0]], host_manager) - time.sleep(timeout) + time.sleep(T_20) # Create new group create_new_agent_group(test_infra_managers[0], group_id, host_manager) @@ -156,7 +155,7 @@ def test_guess_single_group(target_node, status_guess_agent_group, clean_environ # Remove agent from default to test single group guess (not multigroup) host_manager.run_command(test_infra_managers[0], f"/var/ossec/bin/agent_groups -q -r -i {agent_id} -g default") - time.sleep(timeout) + time.sleep(T_20) # Check that agent has group set to group_test on Managers check_agent_groups(agent_id, group_id, test_infra_managers, host_manager) @@ -173,7 +172,7 @@ def test_guess_single_group(target_node, status_guess_agent_group, clean_environ # Restart agent restart_cluster([test_infra_agents[0]], host_manager) - time.sleep(timeout) + time.sleep(T_20) # Check if remoted.guess_agent_group is disabled expected_group = 'default' if int(status_guess_agent_group) == 0 else group_id @@ -228,7 +227,7 @@ def test_guess_multigroups(n_agents, target_node, status_guess_agent_group, clea ''' # Restart master to apply local internal options restart_cluster([test_infra_managers[0]], host_manager) - time.sleep(timeout) + time.sleep(T_20) # Create new group create_new_agent_group(test_infra_managers[0], group_id, host_manager) @@ -241,6 +240,7 @@ def test_guess_multigroups(n_agents, target_node, status_guess_agent_group, clea # Restart agent restart_cluster(test_infra_agents, host_manager) + time.sleep(T_10) # Check that agent has client key file for agent in range(n_agents): @@ -250,7 +250,7 @@ def test_guess_multigroups(n_agents, target_node, status_guess_agent_group, clea # Create new group and assing agent for agent in range(n_agents): assign_agent_to_new_group(test_infra_managers[0], group_id, agents_data[agent][1], host_manager) - time.sleep(timeout) + time.sleep(T_20) # Check that agent has group set to group_test on Managers for agent in range(n_agents): @@ -268,7 +268,7 @@ def test_guess_multigroups(n_agents, target_node, status_guess_agent_group, clea # Restart agent restart_cluster([test_infra_agents[0]], host_manager) - time.sleep(timeout) + time.sleep(T_20) # Check if remoted.guess_agent_group is disabled expected_group = 'default' if int(status_guess_agent_group) == 0 or n_agents == 1 else multigroups_id diff --git a/version.json b/version.json index 4725e35239..8146e7207d 100644 --- a/version.json +++ b/version.json @@ -1,4 +1,4 @@ { "version": "4.8.0", - "revision": "40809" + "revision": "40810" }