diff --git a/CHANGELOG.md b/CHANGELOG.md index aa9394faf4..f6120db779 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,8 +6,9 @@ All notable changes to this project will be documented in this file. ### Fixed +- Changed wazuh-agent service start from install test to registration test ([#5762](https://github.com/wazuh/wazuh-qa/pull/5762)) \- (Tests) - Fix E2E VD tests not working if the Python version is different to 3.9 ([#5787](https://github.com/wazuh/wazuh-qa/pull/5787)) \- (Framework) -- Fix failed to disable wazuh-manager.service ([#5775])(https://github.com/wazuh/wazuh-qa/pull/5775) \- (Tests) +- Fix failed to disable wazuh-manager.service ([#5775](https://github.com/wazuh/wazuh-qa/pull/5775)) \- (Tests) ## [4.9.1] - TBD diff --git a/deployability/modules/testing/tests/helpers/agent.py b/deployability/modules/testing/tests/helpers/agent.py index 671303cadc..56c883139b 100644 --- a/deployability/modules/testing/tests/helpers/agent.py +++ b/deployability/modules/testing/tests/helpers/agent.py @@ -61,9 +61,7 @@ def install_agent(inventory_path, agent_name, wazuh_version, wazuh_revision, liv ]) system_commands = [ "systemctl daemon-reload", - "systemctl enable wazuh-agent", - "systemctl start wazuh-agent", - "systemctl status wazuh-agent" + "systemctl enable wazuh-agent" ] commands.extend(system_commands) @@ -78,7 +76,6 @@ def install_agent(inventory_path, agent_name, wazuh_version, wazuh_revision, liv f"WAZUH_AGENT_NAME='{agent_name}' " f"WAZUH_REGISTRATION_SERVER='MANAGER_IP' " ]) - commands.extend(["NET START WazuhSvc"]) elif os_type == 'macos': if architecture == 'amd64': @@ -89,11 +86,6 @@ def install_agent(inventory_path, agent_name, wazuh_version, wazuh_revision, liv commands.extend([ f'curl -so wazuh-agent.pkg https://{s3_url}.wazuh.com/{release}/macos/wazuh-agent-{wazuh_version}-1.arm64.pkg && echo "WAZUH_MANAGER=\'MANAGER_IP\' && WAZUH_AGENT_NAME=\'{agent_name}\'" > /tmp/wazuh_envs && sudo installer -pkg ./wazuh-agent.pkg -target /' ]) - system_commands = [ - '/Library/Ossec/bin/wazuh-control start', - '/Library/Ossec/bin/wazuh-control status' - ] - commands.extend(system_commands) logger.info(f'Installing Agent in {HostInformation.get_os_name_and_version_from_inventory(inventory_path)}') ConnectionManager.execute_commands(inventory_path, commands) @@ -124,7 +116,8 @@ def register_agent(inventory_path, manager_path): host_ip = HostInformation.get_internal_ip_from_aws_dns(manager_host) if 'amazonaws' in manager_host else manager_host commands = [ f"sed -i 's/
MANAGER_IP<\/address>/{host_ip}<\/address>/g' {WAZUH_CONF}", - "systemctl restart wazuh-agent" + "systemctl start wazuh-agent", + "systemctl status wazuh-agent" ] ConnectionManager.execute_commands(inventory_path, commands) except Exception as e: @@ -141,7 +134,8 @@ def register_agent(inventory_path, manager_path): host_ip = HostInformation.get_public_ip_from_aws_dns(manager_host) commands = [ f"sed -i '.bak' 's/MANAGER_IP<\/address>/{host_ip}<\/address>/g' {WAZUH_MACOS_CONF}", - "/Library/Ossec/bin/wazuh-control restart" + "/Library/Ossec/bin/wazuh-control start", + "/Library/Ossec/bin/wazuh-control status" ] ConnectionManager.execute_commands(inventory_path, commands) except Exception as e: