Skip to content

Commit

Permalink
fix(#5219): Removing commented checkfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
pro-akim committed May 7, 2024
1 parent 64ef9ee commit 41bf6c3
Show file tree
Hide file tree
Showing 7 changed files with 122 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ def test_installation(wazuh_params):

# Agent installation
for agent_name, agent_params in wazuh_params['agents'].items():
#WazuhAgent.perform_install_and_scan_for_agent(agent_params, agent_name, wazuh_params)
WazuhAgent.install_agent(agent_params, agent_name, wazuh_params['wazuh_version'], wazuh_params['wazuh_revision'], wazuh_params['live'])


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ def test_uninstall(wazuh_params):

# Agent uninstallation
for agent_names, agent_params in wazuh_params['agents'].items():
#WazuhAgent.perform_uninstall_and_scan_for_agent(agent_params,wazuh_params)
WazuhAgent.uninstall_agent(agent_params, wazuh_params['wazuh_version'], wazuh_params['wazuh_revision'])

# Manager uninstallation status check
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ def test_installation(wazuh_params):

# Install central components and perform checkfile testing
for _, manager_params in wazuh_params['managers'].items():
#WazuhCentralComponents.perform_install_and_scan_for_aio(manager_params, wazuh_params)
WazuhCentralComponents.install_aio(manager_params, wazuh_params['wazuh_version'])

# Validation of directory of the components
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ def test_uninstall(wazuh_params):
assert 'active' in GeneralComponentActions.get_component_status(indexer_params, 'wazuh-indexer'), logger.error(f'The indexer in {HostInformation.get_os_name_and_version_from_inventory(indexer_params)} is not active')
assert 'active' in GeneralComponentActions.get_component_status(wazuh_params['master'], 'filebeat'), logger.error(f'The filebeat in {HostInformation.get_os_name_and_version_from_inventory(wazuh_params["master"])} is not active')

#WazuhCentralComponents.perform_uninstall_and_scan_for_aio(wazuh_params['master'])
WazuhCentralComponents.uninstall_aio(wazuh_params['master'])

def test_component_uninstalled_directory(wazuh_params):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ def test_installation(wazuh_params):

# Install managers and perform checkfile testing
for manager_name, manager_params in wazuh_params['managers'].items():
#WazuhManager.perform_install_and_scan_for_manager(manager_params, manager_name, wazuh_params)
WazuhManager.install_manager(manager_params, manager_name, wazuh_params['wazuh_version'])

# Validation of activity and directory of the managers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ def test_uninstall(wazuh_params):
manager_status = GeneralComponentActions.get_component_status(manager, 'wazuh-manager')
assert 'active' in manager_status, logger.error(f'The {HostInformation.get_os_name_and_version_from_inventory(manager)} is not active')
for _, manager_params in wazuh_params['managers'].items():
#WazuhManager.perform_uninstall_and_scan_for_manager(manager_params)
WazuhManager.uninstall_manager(manager_params)

def test_manager_uninstalled_directory(wazuh_params):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
version: 0.1
description: This workflow is used to test agents deployment for DDT1 PoC

variables:
agent-os:
- linux-ubuntu-20.04-amd64
- linux-debian-12-amd64
- linux-oracle-9-amd64
- linux-centos-8-amd64
- linux-redhat-9-amd64
- windows-desktop-10-amd64
- windows-server-2012r2-amd64
- windows-server-2016-amd64
- windows-server-2019-amd64
- windows-server-2022-amd64
manager-os: linux-ubuntu-22.04-amd64
infra-provider: vagrant
working-dir: /tmp/dtt1-poc

tasks:
# Unique manager allocate task
- task: "allocate-manager-{manager-os}"
description: "Allocate resources for the manager."
do:
this: process
with:
path: python3
args:
- modules/allocation/main.py
- action: create
- provider: "{infra-provider}"
- size: large
- composite-name: "{manager-os}"
- inventory-output: "{working-dir}/manager-{manager-os}/inventory.yaml"
- track-output: "{working-dir}/manager-{manager-os}/track.yaml"
- label-termination-date: "1d"
- label-team: "qa"
on-error: "abort-all"
cleanup:
this: process
with:
path: python3
args:
- modules/allocation/main.py
- action: delete
- track-output: "{working-dir}/manager-{manager-os}/track.yaml"

# Unique agent allocate task
- task: "allocate-agent-{agent}"
description: "Allocate resources for the agent."
do:
this: process
with:
path: python3
args:
- modules/allocation/main.py
- action: create
- provider: "{infra-provider}"
- size: medium
- composite-name: "{agent}"
- inventory-output: "{working-dir}/agent-{agent}/inventory.yaml"
- track-output: "{working-dir}/agent-{agent}/track.yaml"
- label-termination-date: "1d"
- label-team: "qa"
on-error: "abort-all"
foreach:
- variable: agent-os
as: agent
cleanup:
this: process
with:
path: python3
args:
- modules/allocation/main.py
- action: delete
- track-output: "{working-dir}/agent-{agent}/track.yaml"
depends-on:
- "provision-manager-{manager-os}"

# Unique manager provision task
- task: "provision-manager-{manager-os}"
description: "Provision the manager."
do:
this: process
with:
path: python3
args:
- modules/provision/main.py
- inventory: "{working-dir}/manager-{manager-os}/inventory.yaml"
- install:
- component: wazuh-manager
type: assistant
version: 4.7.4
live: True
depends-on:
- "allocate-manager-{manager-os}"
on-error: "abort-all"

# Generic agent test task
- task: "run-agent-{agent}-tests"
description: "Run tests install for the agent {agent}."
do:
this: process
with:
path: python3
args:
- modules/testing/main.py
- targets:
- wazuh-1: "{working-dir}/manager-{manager-os}/inventory.yaml"
- agent: "{working-dir}/agent-{agent}/inventory.yaml"
- tests: "install,registration,connection,basic_info,restart,stop,uninstall"
- component: "agent"
- wazuh-version: "4.7.4"
- wazuh-revision: "40717"
- live: "True"
foreach:
- variable: agent-os
as: agent
depends-on:
- "allocate-agent-{agent}"
- "provision-manager-{manager-os}"

0 comments on commit 41bf6c3

Please sign in to comment.