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

Agents are not being restarted after manager change in E2E vulnerability detection tests #5355

Merged
merged 10 commits into from
May 13, 2024
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ All notable changes to this project will be documented in this file.

### Fixed

- 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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading