From 263373d8e34b7df35c752892b38cb838265af8d6 Mon Sep 17 00:00:00 2001 From: Antonio Date: Tue, 30 Apr 2024 13:50:23 +0200 Subject: [PATCH] enhancement(#5229): Fixing validations in basic_info agent name --- .../modules/testing/tests/test_agent/test_basic_info.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/deployability/modules/testing/tests/test_agent/test_basic_info.py b/deployability/modules/testing/tests/test_agent/test_basic_info.py index 4170bfea4f..59d79181f6 100644 --- a/deployability/modules/testing/tests/test_agent/test_basic_info.py +++ b/deployability/modules/testing/tests/test_agent/test_basic_info.py @@ -84,10 +84,11 @@ def test_wazuh_os_version(wazuh_params): if not os_type == 'windows': assert HostInformation.get_os_version_from_inventory(agent_params) in WazuhAgent.get_agent_os_version_by_name(wazuh_api, agent_names), logger.error('There is a mismatch between the OS version and the OS version of the installed agent') - if os_type == 'linux': - os_name = HostInformation.get_os_name_from_inventory(agent_params) - elif os_type == 'macos': + + if os_type == 'macos': os_name = 'macos' + else: + os_name = HostInformation.get_os_name_from_inventory(agent_params) assert os_name in WazuhAgent.get_agent_os_name_by_name(wazuh_api, agent_names).replace(' ', ''), logger.error('There is a mismatch between the OS name and the OS name of the installed agent')