With the development of pipelines capable of deploying E2E Wazuh environments, it becomes necessary to incorporate system tests into CI processes.
Currently, system tests use docker environments to deploy managers and agents. This approach makes it impossible to automate pipelines in a scalable way, furthermore, it performs test configuration within the provisioning process, which unequivocally links environments with specific tests making it impossible to reuse those environments.
Given this need, we need to create a framework capable of managing the operations of the current system tests in a fast and intuitive way. In addition, it should also support Windows/macOS/Solaris systems.
flowchart TB
subgraph Jenkins
A[WazuhQAEnvironment] --> |Deployment&Provision| B[EnvironmentInventory]
end
subgraph pytest
C[System Tests] --> B[EnvironmentInventory] --> D[WazuhHandler] --> Report
end
Design
We propose the development of a new class WazuhHandler. This class will inherit from the already defined HostManager.
HostManager class will be responsible only for low-level operations (files and process handling). WazuhHandler instead, will handle the environment at a high level (Wazuh configuration, API requests, Agent removal, etc).
Description
With the development of pipelines capable of deploying E2E Wazuh environments, it becomes necessary to incorporate system tests into CI processes. Currently, system tests use docker environments to deploy managers and agents. This approach makes it impossible to automate pipelines in a scalable way, furthermore, it performs test configuration within the provisioning process, which unequivocally links environments with specific tests making it impossible to reuse those environments.
Given this need, we need to create a framework capable of managing the operations of the current system tests in a fast and intuitive way. In addition, it should also support Windows/macOS/Solaris systems.
Design
We propose the development of a new class
WazuhHandler
. This class will inherit from the already defined HostManager. HostManager class will be responsible only for low-level operations (files and process handling). WazuhHandler instead, will handle the environment at a high level (Wazuh configuration, API requests, Agent removal, etc).Summarizing, this new class should be able to execute the following basic operations of an environment:
It is important to highlight that all the class methods should:
To Do