wazuh-qa
wazuh-qa copied to clipboard
Changed wazuh-agent service start from install test to registration test
Description
This pull request is based on https://github.com/wazuh/wazuh-qa/issues/5741. As said in https://github.com/wazuh/wazuh-qa/issues/5741#issuecomment-2364003587, the service cannot be started in the installation test because there is no manager IP assigned. Therefore, the solution is to start the service in the registration test, after adding the manager IP to the agent configuration.
After doing that and running the test, you can see in the logs that the message reported in the issue no longer appears:
Testing performed
| Validation | Jenkins | Local | OS | Commit | Notes |
|---|---|---|---|---|---|
| ⚫⚫ | :green_circle: :green_circle: | Ubuntu 24.04 | https://github.com/wazuh/wazuh-qa/commit/5584a69747aa5f1b01210855e43f3c2d37149b1d | Nothing to highlight |
Everything related to starting the agent and checking its status has been removed from the installation function since, as no manager has been registered, it will fail to start causing the log reported in this issue. However, even if it fails in that part, the test does not report any failure and passes as valid, which should not happen and for which the following issue has been opened:
- https://github.com/wazuh/wazuh-qa-automation/issues/1142
It has been considered most logical to start the agent after registering a manager. For this reason, the restart in the registration function has been modified by a start, because previously it was not possible to start the agent because there was no associated manager.
As this has been modified for Linux and MacOS only (The change that was made in the Windows test was tested on https://github.com/wazuh/wazuh-qa/pull/5762#issuecomment-2371816242), a build has been run to demonstrate that both the installation test and the registration test work perfectly and that the erroneous log reported in the issue no longer appears.
-
Log: jobflow.log
-
Template: template-5741.txt