wazuh / wazuh-qa

Wazuh - Quality Assurance
GNU General Public License v2.0
60 stars 30 forks source link

Implement Windows tests #5290

Open fcaffieri opened 1 week ago

fcaffieri commented 1 week ago

Description

This PR includes Windows tests for the following versions along with check files tests

Test Windows :green_circle:

Test Windows2022 :green_circle:

test-agent-windows-complete.yaml.txt

windows2022.log.txt

Test Windows2019 :green_circle:

test-agent-windows-complete.yaml.txt

windows2019.log.txt

Test Windows2016 :green_circle:

test-agent-windows-complete.yaml.txt

windows2016.log.txt

Test Windows 10 :green_circle:

test-agent-windows-complete.yaml.txt

windows10.log.txt

Test Windows2012 :green_circle:

test-agent-windows-complete.yaml.txt

windows2012.log.txt

Test With linux and Windows agents :green_circle:

Test five Windows and five Linux:green_circle:

test-agent-windows-complete.yaml.txt

complete_test.log.txt

Test five Windows and five Linux with check-files :green_circle:

test-agent-windows-complete.yaml.txt

complete_test_checkfiles.log.txt

pro-akim commented 1 week ago

Review Notes

Tests are failing:

Install example ``` TASK [Test install for agent] ************************************************** fatal: [localhost]: FAILED! => changed=true cmd: - python3 - -m - pytest - modules/testing/tests/test_agent/test_install.py - -v - --wazuh_version=4.7.3 - --wazuh_revision=40714 - --component=agent - --dependencies={} - '--targets={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml, agent: /tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml}' - --live=True - -s delta: '0:00:10.005120' end: '2024-04-26 14:52:23.848487' msg: non-zero return code rc: 1 start: '2024-04-26 14:52:13.843367' stderr: '' stderr_lines: stdout: |- [37m[2024-04-26 14:52:14] [DEBUG] SPNEGO._GSS: Python gssapi not available, cannot use any GSSAPIProxy protocols: No module named 'gssapi'[0m [37m[2024-04-26 14:52:14] [DEBUG] SPNEGO._GSS: Python gssapi IOV extension not available: No module named 'gssapi'[0m ============================= test session starts ============================== platform linux -- Python 3.10.12, pytest-7.4.4, pluggy-1.4.0 -- /home/akim/Desktop/venvs/dtt1/bin/python3 cachedir: .pytest_cache rootdir: /home/akim/Desktop/wazuh-qa/deployability/modules plugins: tinybird-0.2.0 collecting ... collected 2 items modules/testing/tests/test_agent/test_install.py::test_installation [32m[2024-04-26 14:52:14] [INFO] TESTER: Checking connection to server-2022[0m [32m[2024-04-26 14:52:16] [INFO] TESTER: WinRM connection successful.[0m ERROR modules/testing/tests/test_agent/test_install.py::test_status ERROR ==================================== ERRORS ==================================== _____________________ ERROR at setup of test_installation ______________________ data = {'host': 'ec2-54-224-81-92.compute-1.amazonaws.com', 'password': 'f9RtXVuAzIE', 'port': 5986, 'private_key_path': None, ...} command = "Get-Service -Name 'Wazuh'" @staticmethod def _execute_command(data: ConectionInventory, command) -> dict: if data.get('port') == 5986: protocol = 'https' else: protocol = 'http' endpoint_url = f"{protocol}://{data.get('host')}:{data.get('port')}" try: session = winrm.Session(endpoint_url, auth=(data.get('username'), data.get('password')),transport='ntlm', server_cert_validation='ignore') > ret = session.run_ps(command) modules/testing/tests/helpers/executor.py:73: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../venvs/dtt1/lib/python3.10/site-packages/winrm/__init__.py:54: in run_ps rs.std_err = self._clean_error_msg(rs.std_err) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = msg = b'#< CLIXML\r\n _x000D__x000A_' def _clean_error_msg(self, msg): """converts a Powershell CLIXML message to a more human readable string """ # TODO prepare unit test, beautify code # if the msg does not start with this, return it as is > if msg.startswith("#< CLIXML\r\n"): E TypeError: startswith first arg must be bytes or a tuple of bytes, not str ../../venvs/dtt1/lib/python3.10/site-packages/winrm/__init__.py:62: TypeError During handling of the above exception, another exception occurred: inventory_path = '/tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml' commands = "Get-Service -Name 'Wazuh'" @staticmethod def execute_commands(inventory_path, commands) -> dict: executor = ConnectionManager._get_executor(inventory_path) if isinstance(commands, str): try: > result = executor._execute_command(ConectionInventory._get_inventory_data(inventory_path), commands) modules/testing/tests/helpers/executor.py:50: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ data = {'host': 'ec2-54-224-81-92.compute-1.amazonaws.com', 'password': 'f9RtXVuAzIE', 'port': 5986, 'private_key_path': None, ...} command = "Get-Service -Name 'Wazuh'" @staticmethod def _execute_command(data: ConectionInventory, command) -> dict: if data.get('port') == 5986: protocol = 'https' else: protocol = 'http' endpoint_url = f"{protocol}://{data.get('host')}:{data.get('port')}" try: session = winrm.Session(endpoint_url, auth=(data.get('username'), data.get('password')),transport='ntlm', server_cert_validation='ignore') ret = session.run_ps(command) if ret.status_code == 0: return {'success': True, 'output': ret.std_out.decode('utf-8').strip()} else: return {'success': False, 'output': ret.std_err.decode('utf-8').strip()} except Exception as e: > raise Exception(f'Error executing command: {command} with error: {e}') E Exception: Error executing command: Get-Service -Name 'Wazuh' with error: startswith first arg must be bytes or a tuple of bytes, not str modules/testing/tests/helpers/executor.py:80: Exception During handling of the above exception, another exception occurred: wazuh_params = {'agents': {'agent-windows-server-2022-amd64': '/tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml'}, 'dashb...entory.yaml', 'dependencies': '{}', 'indexers': ['/tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml'], ...} @pytest.fixture(scope="module", autouse=True) def setup_test_environment(wazuh_params): targets = wazuh_params['targets'] # Clean the string and split it into key-value pairs targets = targets.replace(' ', '') targets = targets.replace(' ', '') pairs = [pair.strip() for pair in targets.strip('{}').split(',')] targets_dict = dict(pair.split(':') for pair in pairs) wazuh_params['master'] = targets_dict.get('wazuh-1') wazuh_params['workers'] = [value for key, value in targets_dict.items() if key.startswith('wazuh-') and key != 'wazuh-1'] wazuh_params['agents'] = [value for key, value in targets_dict.items() if key.startswith('agent')] wazuh_params['indexers'] = [value for key, value in targets_dict.items() if key.startswith('node-')] wazuh_params['dashboard'] = targets_dict.get('dashboard', wazuh_params['master']) # If there are no indexers, we choose wazuh-1 by default if not wazuh_params['indexers']: wazuh_params['indexers'].append(wazuh_params['master']) wazuh_params['managers'] = {key: value for key, value in targets_dict.items() if key.startswith('wazuh-')} wazuh_params['agents'] = {key + '-' + re.findall(r'agent-(.*?)/', value)[0].replace('.',''): value for key, value in targets_dict.items() if key.startswith('agent')} updated_agents = {} for agent_name, agent_params in wazuh_params['agents'].items(): Utils.check_inventory_connection(agent_params) > if GeneralComponentActions.isComponentActive(agent_params, 'wazuh-agent') and GeneralComponentActions.hasAgentClientKeys(agent_params): modules/testing/tests/test_agent/test_install.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ modules/testing/tests/helpers/generic.py:795: in isComponentActive result = ConnectionManager.execute_commands(inventory_path, "Get-Service -Name 'Wazuh'") _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ inventory_path = '/tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml' commands = "Get-Service -Name 'Wazuh'" @staticmethod def execute_commands(inventory_path, commands) -> dict: executor = ConnectionManager._get_executor(inventory_path) if isinstance(commands, str): try: result = executor._execute_command(ConectionInventory._get_inventory_data(inventory_path), commands) except Exception as e: > raise Exception(f'Error executing command: {commands} with error: {e}') E Exception: Error executing command: Get-Service -Name 'Wazuh' with error: Error executing command: Get-Service -Name 'Wazuh' with error: startswith first arg must be bytes or a tuple of bytes, not str modules/testing/tests/helpers/executor.py:52: Exception ________________________ ERROR at setup of test_status _________________________ data = {'host': 'ec2-54-224-81-92.compute-1.amazonaws.com', 'password': 'f9RtXVuAzIE', 'port': 5986, 'private_key_path': None, ...} command = "Get-Service -Name 'Wazuh'" @staticmethod def _execute_command(data: ConectionInventory, command) -> dict: if data.get('port') == 5986: protocol = 'https' else: protocol = 'http' endpoint_url = f"{protocol}://{data.get('host')}:{data.get('port')}" try: session = winrm.Session(endpoint_url, auth=(data.get('username'), data.get('password')),transport='ntlm', server_cert_validation='ignore') > ret = session.run_ps(command) modules/testing/tests/helpers/executor.py:73: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../venvs/dtt1/lib/python3.10/site-packages/winrm/__init__.py:54: in run_ps rs.std_err = self._clean_error_msg(rs.std_err) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = msg = b'#< CLIXML\r\n _x000D__x000A_' def _clean_error_msg(self, msg): """converts a Powershell CLIXML message to a more human readable string """ # TODO prepare unit test, beautify code # if the msg does not start with this, return it as is > if msg.startswith("#< CLIXML\r\n"): E TypeError: startswith first arg must be bytes or a tuple of bytes, not str ../../venvs/dtt1/lib/python3.10/site-packages/winrm/__init__.py:62: TypeError During handling of the above exception, another exception occurred: inventory_path = '/tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml' commands = "Get-Service -Name 'Wazuh'" @staticmethod def execute_commands(inventory_path, commands) -> dict: executor = ConnectionManager._get_executor(inventory_path) if isinstance(commands, str): try: > result = executor._execute_command(ConectionInventory._get_inventory_data(inventory_path), commands) modules/testing/tests/helpers/executor.py:50: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ data = {'host': 'ec2-54-224-81-92.compute-1.amazonaws.com', 'password': 'f9RtXVuAzIE', 'port': 5986, 'private_key_path': None, ...} command = "Get-Service -Name 'Wazuh'" @staticmethod def _execute_command(data: ConectionInventory, command) -> dict: if data.get('port') == 5986: protocol = 'https' else: protocol = 'http' endpoint_url = f"{protocol}://{data.get('host')}:{data.get('port')}" try: session = winrm.Session(endpoint_url, auth=(data.get('username'), data.get('password')),transport='ntlm', server_cert_validation='ignore') ret = session.run_ps(command) if ret.status_code == 0: return {'success': True, 'output': ret.std_out.decode('utf-8').strip()} else: return {'success': False, 'output': ret.std_err.decode('utf-8').strip()} except Exception as e: > raise Exception(f'Error executing command: {command} with error: {e}') E Exception: Error executing command: Get-Service -Name 'Wazuh' with error: startswith first arg must be bytes or a tuple of bytes, not str modules/testing/tests/helpers/executor.py:80: Exception During handling of the above exception, another exception occurred: wazuh_params = {'agents': {'agent-windows-server-2022-amd64': '/tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml'}, 'dashb...entory.yaml', 'dependencies': '{}', 'indexers': ['/tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml'], ...} @pytest.fixture(scope="module", autouse=True) def setup_test_environment(wazuh_params): targets = wazuh_params['targets'] # Clean the string and split it into key-value pairs targets = targets.replace(' ', '') targets = targets.replace(' ', '') pairs = [pair.strip() for pair in targets.strip('{}').split(',')] targets_dict = dict(pair.split(':') for pair in pairs) wazuh_params['master'] = targets_dict.get('wazuh-1') wazuh_params['workers'] = [value for key, value in targets_dict.items() if key.startswith('wazuh-') and key != 'wazuh-1'] wazuh_params['agents'] = [value for key, value in targets_dict.items() if key.startswith('agent')] wazuh_params['indexers'] = [value for key, value in targets_dict.items() if key.startswith('node-')] wazuh_params['dashboard'] = targets_dict.get('dashboard', wazuh_params['master']) # If there are no indexers, we choose wazuh-1 by default if not wazuh_params['indexers']: wazuh_params['indexers'].append(wazuh_params['master']) wazuh_params['managers'] = {key: value for key, value in targets_dict.items() if key.startswith('wazuh-')} wazuh_params['agents'] = {key + '-' + re.findall(r'agent-(.*?)/', value)[0].replace('.',''): value for key, value in targets_dict.items() if key.startswith('agent')} updated_agents = {} for agent_name, agent_params in wazuh_params['agents'].items(): Utils.check_inventory_connection(agent_params) > if GeneralComponentActions.isComponentActive(agent_params, 'wazuh-agent') and GeneralComponentActions.hasAgentClientKeys(agent_params): modules/testing/tests/test_agent/test_install.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ modules/testing/tests/helpers/generic.py:795: in isComponentActive result = ConnectionManager.execute_commands(inventory_path, "Get-Service -Name 'Wazuh'") _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ inventory_path = '/tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml' commands = "Get-Service -Name 'Wazuh'" @staticmethod def execute_commands(inventory_path, commands) -> dict: executor = ConnectionManager._get_executor(inventory_path) if isinstance(commands, str): try: result = executor._execute_command(ConectionInventory._get_inventory_data(inventory_path), commands) except Exception as e: > raise Exception(f'Error executing command: {commands} with error: {e}') E Exception: Error executing command: Get-Service -Name 'Wazuh' with error: Error executing command: Get-Service -Name 'Wazuh' with error: startswith first arg must be bytes or a tuple of bytes, not str modules/testing/tests/helpers/executor.py:52: Exception =============================== warnings summary =============================== modules/provision/models.py:36 /home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:36: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/ @validator('dependencies', pre=True) modules/provision/models.py:64 /home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:64: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/ @validator('install', 'uninstall', pre=True) testing/tests/test_agent/test_install.py::test_installation testing/tests/test_agent/test_install.py::test_installation /home/akim/Desktop/venvs/dtt1/lib/python3.10/site-packages/winrm/transport.py:283: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec() argspec = set(inspect.getargspec(function).args) -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info ============================ ERROR modules/testing/tests/test_agent/test_install.py::test_installation - E... ERROR modules/testing/tests/test_agent/test_install.py::test_status - Excepti... ======================== 4 warnings, 2 errors in 9.24s ========================= stdout_lines: ```

After reinstalling the requirements, it worked fine

Result ``` [2024-04-26 16:23:11,507] [INFO] [117037] [MainThread] [workflow_engine]: Executing DAG tasks. [2024-04-26 16:23:11,507] [INFO] [117037] [MainThread] [workflow_engine]: Executing tasks in parallel. [2024-04-26 16:23:11,508] [INFO] [117037] [ThreadPoolExecutor-0_0] [workflow_engine]: [run-agent-windows-server-2022-amd64-tests] Starting task. [2024-04-26 16:23:11,513] [DEBUG] [117037] [ThreadPoolExecutor-0_0] [workflow_engine]: Running task "run-agent-windows-server-2022-amd64-tests" with arguments: ['modules/testing/main.py', "--targets={'wazuh-1': '/tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml'}", "--targets={'agent': '/tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml'}", '--tests=install,registration,connection,basic_info,stop,restart,uninstall', '--component=agent', '--wazuh-version=4.7.3', '--wazuh-revision=40714', '--live=True'] [2024-04-26 16:23:11,990] [DEBUG] SPNEGO._GSS: Python gssapi not available, cannot use any GSSAPIProxy protocols: No module named 'gssapi' [2024-04-26 16:23:11,991] [DEBUG] SPNEGO._GSS: Python gssapi IOV extension not available: No module named 'gssapi' [2024-04-26 16:23:12,115] [INFO] TESTER: Running tests for ec2-44-202-87-116.compute-1.amazonaws.com [2024-04-26 16:23:12,116] [INFO] TESTER: Running tests for ec2-35-175-149-201.compute-1.amazonaws.com [2024-04-26 16:23:12,117] [DEBUG] TESTER: Using extra vars: {'component': 'agent', 'wazuh_version': '4.7.3', 'wazuh_revision': '40714', 'wazuh_branch': None, 'working_dir': '/tmp/tests', 'live': True, 'hosts_ip': ['ec2-44-202-87-116.compute-1.amazonaws.com', 'ec2-35-175-149-201.compute-1.amazonaws.com'], 'targets': '{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml, agent: /tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml}', 'dependencies': '{}', 'local_host_path': '/home/akim/Desktop/wazuh-qa/deployability', 'current_user': 'akim'} [2024-04-26 16:23:12,122] [DEBUG] TESTER: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/setup.yml [2024-04-26 16:23:12,123] [DEBUG] TESTER: Using inventory: {'all': {'hosts': {'ec2-44-202-87-116.compute-1.amazonaws.com': {'ansible_port': 2200, 'ansible_user': 'ubuntu', 'ansible_ssh_private_key_file': '/tmp/wazuh-qa/i-0dac7a5de0b996fa6/ubuntu-22.04-amd64-key-4157'}}}} [2024-04-26 16:23:12,124] [DEBUG] TESTER: Running playbook: [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Cleaning old key ssh-keygen registries', 'ansible.builtin.command': {'cmd': "ssh-keygen -f /home/akim/.ssh/known_hosts -R ''"}, 'loop': ['ec2-44-202-87-116.compute-1.amazonaws.com', 'ec2-35-175-149-201.compute-1.amazonaws.com']}]}] [2024-04-26 16:23:18,968] [DEBUG] TESTER: Playbook [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Cleaning old key ssh-keygen registries', 'ansible.builtin.command': {'cmd': "ssh-keygen -f /home/akim/.ssh/known_hosts -R ''"}, 'loop': ['ec2-44-202-87-116.compute-1.amazonaws.com', 'ec2-35-175-149-201.compute-1.amazonaws.com']}]}] finished with status {'skipped': {}, 'ok': {'localhost': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'localhost': 1}, 'changed': {'localhost': 1}} [2024-04-26 16:23:18,970] [DEBUG] TESTER: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/test.yml [2024-04-26 16:23:18,972] [DEBUG] TESTER: Using inventory: {'all': {'hosts': {'ec2-44-202-87-116.compute-1.amazonaws.com': {'ansible_port': 2200, 'ansible_user': 'ubuntu', 'ansible_ssh_private_key_file': '/tmp/wazuh-qa/i-0dac7a5de0b996fa6/ubuntu-22.04-amd64-key-4157'}}}} [2024-04-26 16:23:18,972] [DEBUG] TESTER: Running playbook: [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test install for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_install.py -v --wazuh_version=4.7.3 --wazuh_revision=40714 --component=agent --dependencies='{}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml, agent: /tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}] [2024-04-26 16:23:22,801] [DEBUG] SPNEGO._GSS: Python gssapi not available, cannot use any GSSAPIProxy protocols: No module named 'gssapi' [2024-04-26 16:23:22,802] [DEBUG] SPNEGO._GSS: Python gssapi IOV extension not available: No module named 'gssapi' [2024-04-26 16:23:22,992] [INFO] TESTER: Checking connection to server-2022 [2024-04-26 16:23:24,566] [INFO] TESTER: WinRM connection successful. [2024-04-26 16:23:26,981] [INFO] TESTER: Checking connection to ubuntu-22.04 [2024-04-26 16:23:27,912] [INFO] TESTER: Connection established successfully in ubuntu-22.04 [2024-04-26 16:23:27,915] [INFO] TESTER: Firewall disabled on server-2022 [2024-04-26 16:23:35,449] [INFO] TESTER: Manager is already installed in ubuntu-22.04 [2024-04-26 16:23:37,035] [INFO] TESTER: Generating Snapshot for Checkfile in server-2022 [2024-04-26 16:24:51,102] [INFO] TESTER: Installing Agent in server-2022 [2024-04-26 16:25:09,166] [INFO] TESTER: Generating Snapshot for Checkfile in server-2022 [2024-04-26 16:26:23,386] [INFO] TESTER: Applying filters in checkfiles in server-2022 [2024-04-26 16:26:23,386] [INFO] TESTER: Pre and post install checkfile comparison in server-2022: {'C:\\Program Files': {'added': [], 'removed': [], 'modified': []}, 'C:\\Program Files (x86)': {'added': [], 'removed': [], 'modified': []}, 'C:\\Users\\vagrant': {'added': [], 'removed': [], 'modified': []}} [2024-04-26 16:26:23,981] [DEBUG] TESTER: Playbook [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test install for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_install.py -v --wazuh_version=4.7.3 --wazuh_revision=40714 --component=agent --dependencies='{}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml, agent: /tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}] finished with status {'skipped': {}, 'ok': {'localhost': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'localhost': 1}, 'changed': {'localhost': 1}} [2024-04-26 16:26:23,984] [DEBUG] TESTER: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/test.yml [2024-04-26 16:26:23,985] [DEBUG] TESTER: Using inventory: {'all': {'hosts': {'ec2-44-202-87-116.compute-1.amazonaws.com': {'ansible_port': 2200, 'ansible_user': 'ubuntu', 'ansible_ssh_private_key_file': '/tmp/wazuh-qa/i-0dac7a5de0b996fa6/ubuntu-22.04-amd64-key-4157'}}}} [2024-04-26 16:26:23,985] [DEBUG] TESTER: Running playbook: [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test registration for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_registration.py -v --wazuh_version=4.7.3 --wazuh_revision=40714 --component=agent --dependencies='{}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml, agent: /tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}] [2024-04-26 16:26:31,905] [DEBUG] SPNEGO._GSS: Python gssapi not available, cannot use any GSSAPIProxy protocols: No module named 'gssapi' [2024-04-26 16:26:31,906] [DEBUG] SPNEGO._GSS: Python gssapi IOV extension not available: No module named 'gssapi' [2024-04-26 16:26:32,102] [INFO] TESTER: Checking connection to server-2022 [2024-04-26 16:26:33,674] [INFO] TESTER: WinRM connection successful. [2024-04-26 16:26:40,997] [INFO] TESTER: os_type windows [2024-04-26 16:26:49,961] [INFO] TESTER: Getting status of server-2022 [2024-04-26 16:28:13,630] [DEBUG] TESTER: Playbook [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test registration for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_registration.py -v --wazuh_version=4.7.3 --wazuh_revision=40714 --component=agent --dependencies='{}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml, agent: /tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}] finished with status {'skipped': {}, 'ok': {'localhost': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'localhost': 1}, 'changed': {'localhost': 1}} [2024-04-26 16:28:13,632] [DEBUG] TESTER: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/test.yml [2024-04-26 16:28:13,634] [DEBUG] TESTER: Using inventory: {'all': {'hosts': {'ec2-44-202-87-116.compute-1.amazonaws.com': {'ansible_port': 2200, 'ansible_user': 'ubuntu', 'ansible_ssh_private_key_file': '/tmp/wazuh-qa/i-0dac7a5de0b996fa6/ubuntu-22.04-amd64-key-4157'}}}} [2024-04-26 16:28:13,635] [DEBUG] TESTER: Running playbook: [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test connection for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_connection.py -v --wazuh_version=4.7.3 --wazuh_revision=40714 --component=agent --dependencies='{}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml, agent: /tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}] [2024-04-26 16:28:20,605] [DEBUG] SPNEGO._GSS: Python gssapi not available, cannot use any GSSAPIProxy protocols: No module named 'gssapi' [2024-04-26 16:28:20,605] [DEBUG] SPNEGO._GSS: Python gssapi IOV extension not available: No module named 'gssapi' [2024-04-26 16:28:20,835] [INFO] TESTER: Checking connection to server-2022 [2024-04-26 16:28:22,344] [INFO] TESTER: WinRM connection successful. [2024-04-26 16:28:40,143] [INFO] TESTER: Getting status of server-2022 [2024-04-26 16:28:57,360] [DEBUG] TESTER: Playbook [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test connection for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_connection.py -v --wazuh_version=4.7.3 --wazuh_revision=40714 --component=agent --dependencies='{}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml, agent: /tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}] finished with status {'skipped': {}, 'ok': {'localhost': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'localhost': 1}, 'changed': {'localhost': 1}} [2024-04-26 16:28:57,363] [DEBUG] TESTER: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/test.yml [2024-04-26 16:28:57,367] [DEBUG] TESTER: Using inventory: {'all': {'hosts': {'ec2-44-202-87-116.compute-1.amazonaws.com': {'ansible_port': 2200, 'ansible_user': 'ubuntu', 'ansible_ssh_private_key_file': '/tmp/wazuh-qa/i-0dac7a5de0b996fa6/ubuntu-22.04-amd64-key-4157'}}}} [2024-04-26 16:28:57,367] [DEBUG] TESTER: Running playbook: [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test basic_info for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_basic_info.py -v --wazuh_version=4.7.3 --wazuh_revision=40714 --component=agent --dependencies='{}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml, agent: /tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}] [2024-04-26 16:29:04,720] [DEBUG] SPNEGO._GSS: Python gssapi not available, cannot use any GSSAPIProxy protocols: No module named 'gssapi' [2024-04-26 16:29:04,721] [DEBUG] SPNEGO._GSS: Python gssapi IOV extension not available: No module named 'gssapi' [2024-04-26 16:29:04,938] [INFO] TESTER: Checking connection to server-2022 [2024-04-26 16:29:06,526] [INFO] TESTER: WinRM connection successful. [2024-04-26 16:29:26,340] [DEBUG] TESTER: Playbook [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test basic_info for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_basic_info.py -v --wazuh_version=4.7.3 --wazuh_revision=40714 --component=agent --dependencies='{}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml, agent: /tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}] finished with status {'skipped': {}, 'ok': {'localhost': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'localhost': 1}, 'changed': {'localhost': 1}} [2024-04-26 16:29:26,342] [DEBUG] TESTER: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/test.yml [2024-04-26 16:29:26,344] [DEBUG] TESTER: Using inventory: {'all': {'hosts': {'ec2-44-202-87-116.compute-1.amazonaws.com': {'ansible_port': 2200, 'ansible_user': 'ubuntu', 'ansible_ssh_private_key_file': '/tmp/wazuh-qa/i-0dac7a5de0b996fa6/ubuntu-22.04-amd64-key-4157'}}}} [2024-04-26 16:29:26,344] [DEBUG] TESTER: Running playbook: [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test stop for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_stop.py -v --wazuh_version=4.7.3 --wazuh_revision=40714 --component=agent --dependencies='{}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml, agent: /tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}] [2024-04-26 16:29:33,344] [DEBUG] SPNEGO._GSS: Python gssapi not available, cannot use any GSSAPIProxy protocols: No module named 'gssapi' [2024-04-26 16:29:33,345] [DEBUG] SPNEGO._GSS: Python gssapi IOV extension not available: No module named 'gssapi' [2024-04-26 16:29:33,553] [INFO] TESTER: Checking connection to server-2022 [2024-04-26 16:29:35,082] [INFO] TESTER: WinRM connection successful. [2024-04-26 16:29:47,040] [INFO] TESTER: Stopping wazuh-agent in server-2022 [2024-04-26 16:29:49,752] [INFO] TESTER: Getting status of server-2022 [2024-04-26 16:29:56,854] [INFO] TESTER: Restarting wazuh-agent in server-2022 [2024-04-26 16:30:03,544] [DEBUG] TESTER: Playbook [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test stop for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_stop.py -v --wazuh_version=4.7.3 --wazuh_revision=40714 --component=agent --dependencies='{}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml, agent: /tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}] finished with status {'skipped': {}, 'ok': {'localhost': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'localhost': 1}, 'changed': {'localhost': 1}} [2024-04-26 16:30:03,547] [DEBUG] TESTER: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/test.yml [2024-04-26 16:30:03,550] [DEBUG] TESTER: Using inventory: {'all': {'hosts': {'ec2-44-202-87-116.compute-1.amazonaws.com': {'ansible_port': 2200, 'ansible_user': 'ubuntu', 'ansible_ssh_private_key_file': '/tmp/wazuh-qa/i-0dac7a5de0b996fa6/ubuntu-22.04-amd64-key-4157'}}}} [2024-04-26 16:30:03,550] [DEBUG] TESTER: Running playbook: [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test restart for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_restart.py -v --wazuh_version=4.7.3 --wazuh_revision=40714 --component=agent --dependencies='{}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml, agent: /tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}] [2024-04-26 16:30:10,910] [DEBUG] SPNEGO._GSS: Python gssapi not available, cannot use any GSSAPIProxy protocols: No module named 'gssapi' [2024-04-26 16:30:10,911] [DEBUG] SPNEGO._GSS: Python gssapi IOV extension not available: No module named 'gssapi' [2024-04-26 16:30:11,174] [INFO] TESTER: Checking connection to server-2022 [2024-04-26 16:30:12,689] [INFO] TESTER: WinRM connection successful. [2024-04-26 16:30:19,986] [INFO] TESTER: Restarting wazuh-agent in server-2022 [2024-04-26 16:30:26,157] [INFO] TESTER: Getting status of server-2022 [2024-04-26 16:30:38,455] [DEBUG] TESTER: Playbook [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test restart for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_restart.py -v --wazuh_version=4.7.3 --wazuh_revision=40714 --component=agent --dependencies='{}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml, agent: /tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}] finished with status {'skipped': {}, 'ok': {'localhost': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'localhost': 1}, 'changed': {'localhost': 1}} [2024-04-26 16:30:38,458] [DEBUG] TESTER: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/test.yml [2024-04-26 16:30:38,461] [DEBUG] TESTER: Using inventory: {'all': {'hosts': {'ec2-44-202-87-116.compute-1.amazonaws.com': {'ansible_port': 2200, 'ansible_user': 'ubuntu', 'ansible_ssh_private_key_file': '/tmp/wazuh-qa/i-0dac7a5de0b996fa6/ubuntu-22.04-amd64-key-4157'}}}} [2024-04-26 16:30:38,461] [DEBUG] TESTER: Running playbook: [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test uninstall for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_uninstall.py -v --wazuh_version=4.7.3 --wazuh_revision=40714 --component=agent --dependencies='{}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml, agent: /tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}] [2024-04-26 16:30:45,530] [DEBUG] SPNEGO._GSS: Python gssapi not available, cannot use any GSSAPIProxy protocols: No module named 'gssapi' [2024-04-26 16:30:45,531] [DEBUG] SPNEGO._GSS: Python gssapi IOV extension not available: No module named 'gssapi' [2024-04-26 16:30:45,754] [INFO] TESTER: Checking connection to server-2022 [2024-04-26 16:30:48,191] [INFO] TESTER: WinRM connection successful. [2024-04-26 16:30:58,198] [INFO] TESTER: Generating Snapshot for Checkfile in server-2022 [2024-04-26 16:37:03,619] [INFO] TESTER: Uninstalling Agent in server-2022 [2024-04-26 16:37:14,817] [INFO] TESTER: Generating Snapshot for Checkfile in server-2022 [2024-04-26 16:38:19,630] [INFO] TESTER: Applying filters in checkfiles in server-2022 [2024-04-26 16:38:19,630] [INFO] TESTER: Pre and post uninstall checkfile comparison in server-2022: {'C:\\Program Files': {'added': [], 'removed': [], 'modified': []}, 'C:\\Program Files (x86)': {'added': [], 'removed': [], 'modified': []}, 'C:\\Users\\vagrant': {'added': [], 'removed': [], 'modified': []}} [2024-04-26 16:38:38,959] [DEBUG] TESTER: Playbook [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test uninstall for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_uninstall.py -v --wazuh_version=4.7.3 --wazuh_revision=40714 --component=agent --dependencies='{}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml, agent: /tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}] finished with status {'skipped': {}, 'ok': {'localhost': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'localhost': 1}, 'changed': {'localhost': 1}} [2024-04-26 16:38:38,961] [INFO] TESTER: Cleaning up [2024-04-26 16:38:38,961] [DEBUG] TESTER: Using inventory: {'all': {'hosts': {'ec2-44-202-87-116.compute-1.amazonaws.com': {'ansible_port': 2200, 'ansible_user': 'ubuntu', 'ansible_ssh_private_key_file': '/tmp/wazuh-qa/i-0dac7a5de0b996fa6/ubuntu-22.04-amd64-key-4157'}}}} [2024-04-26 16:38:38,962] [DEBUG] TESTER: Running playbook: /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/cleanup.yml [2024-04-26 16:38:48,063] [DEBUG] TESTER: Playbook /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/cleanup.yml finished with status {'skipped': {}, 'ok': {'ec2-44-202-87-116.compute-1.amazonaws.com': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'ec2-44-202-87-116.compute-1.amazonaws.com': 1}, 'changed': {}} [2024-04-26 16:38:48,064] [INFO] TESTER: Cleaning up [2024-04-26 16:38:48,065] [DEBUG] TESTER: Using inventory: {'all': {'hosts': {'ec2-44-202-87-116.compute-1.amazonaws.com': {'ansible_port': 2200, 'ansible_user': 'ubuntu', 'ansible_ssh_private_key_file': '/tmp/wazuh-qa/i-0dac7a5de0b996fa6/ubuntu-22.04-amd64-key-4157'}}}} [2024-04-26 16:38:48,065] [DEBUG] TESTER: Running playbook: /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/cleanup.yml [2024-04-26 16:38:55,922] [DEBUG] TESTER: Playbook /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/cleanup.yml finished with status {'skipped': {}, 'ok': {'ec2-44-202-87-116.compute-1.amazonaws.com': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'ec2-44-202-87-116.compute-1.amazonaws.com': 1}, 'changed': {}} [2024-04-26 16:38:56,053] [DEBUG] [117037] [ThreadPoolExecutor-0_0] [workflow_engine]: Finished task "run-agent-windows-server-2022-amd64-tests" execution with result: [2024-04-26 16:23:11] [DEBUG] SPNEGO._GSS: Python gssapi not available, cannot use any GSSAPIProxy protocols: No module named 'gssapi' [2024-04-26 16:23:11] [DEBUG] SPNEGO._GSS: Python gssapi IOV extension not available: No module named 'gssapi' [2024-04-26 16:23:12] [INFO] TESTER: Running tests for ec2-44-202-87-116.compute-1.amazonaws.com [2024-04-26 16:23:12] [INFO] TESTER: Running tests for ec2-35-175-149-201.compute-1.amazonaws.com [2024-04-26 16:23:12] [DEBUG] TESTER: Using extra vars: {'component': 'agent', 'wazuh_version': '4.7.3', 'wazuh_revision': '40714', 'wazuh_branch': None, 'working_dir': '/tmp/tests', 'live': True, 'hosts_ip': ['ec2-44-202-87-116.compute-1.amazonaws.com', 'ec2-35-175-149-201.compute-1.amazonaws.com'], 'targets': '{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml, agent: /tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml}', 'dependencies': '{}', 'local_host_path': '/home/akim/Desktop/wazuh-qa/deployability', 'current_user': 'akim'} [2024-04-26 16:23:12] [DEBUG] TESTER: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/setup.yml [2024-04-26 16:23:12] [DEBUG] TESTER: Using inventory: {'all': {'hosts': {'ec2-44-202-87-116.compute-1.amazonaws.com': {'ansible_port': 2200, 'ansible_user': 'ubuntu', 'ansible_ssh_private_key_file': '/tmp/wazuh-qa/i-0dac7a5de0b996fa6/ubuntu-22.04-amd64-key-4157'}}}} [2024-04-26 16:23:12] [DEBUG] TESTER: Running playbook: [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Cleaning old key ssh-keygen registries', 'ansible.builtin.command': {'cmd': "ssh-keygen -f /home/akim/.ssh/known_hosts -R ''"}, 'loop': ['ec2-44-202-87-116.compute-1.amazonaws.com', 'ec2-35-175-149-201.compute-1.amazonaws.com']}]}] No config file found; using defaults PLAY [localhost] *************************************************************** TASK [Gathering Facts] ********************************************************* ok: [localhost] TASK [Cleaning old key ssh-keygen registries] ********************************** changed: [localhost] => (item=ec2-44-202-87-116.compute-1.amazonaws.com) => changed=true   ansible_loop_var: item  cmd:  - ssh-keygen  - -f  - /home/akim/.ssh/known_hosts  - -R  - ''  delta: '0:00:00.012592'  end: '2024-04-26 16:23:18.474493'  item: ec2-44-202-87-116.compute-1.amazonaws.com  msg: ''  rc: 0  start: '2024-04-26 16:23:18.461901'  stderr: Host not found in /home/akim/.ssh/known_hosts  stderr_lines:   stdout: ''  stdout_lines:  changed: [localhost] => (item=ec2-35-175-149-201.compute-1.amazonaws.com) => changed=true   ansible_loop_var: item  cmd:  - ssh-keygen  - -f  - /home/akim/.ssh/known_hosts  - -R  - ''  delta: '0:00:00.012376'  end: '2024-04-26 16:23:18.663687'  item: ec2-35-175-149-201.compute-1.amazonaws.com  msg: ''  rc: 0  start: '2024-04-26 16:23:18.651311'  stderr: Host not found in /home/akim/.ssh/known_hosts  stderr_lines:   stdout: ''  stdout_lines:  PLAY RECAP ********************************************************************* localhost : ok=2  changed=1  unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 [2024-04-26 16:23:18] [DEBUG] TESTER: Playbook [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Cleaning old key ssh-keygen registries', 'ansible.builtin.command': {'cmd': "ssh-keygen -f /home/akim/.ssh/known_hosts -R ''"}, 'loop': ['ec2-44-202-87-116.compute-1.amazonaws.com', 'ec2-35-175-149-201.compute-1.amazonaws.com']}]}] finished with status {'skipped': {}, 'ok': {'localhost': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'localhost': 1}, 'changed': {'localhost': 1}} [2024-04-26 16:23:18] [DEBUG] TESTER: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/test.yml [2024-04-26 16:23:18] [DEBUG] TESTER: Using inventory: {'all': {'hosts': {'ec2-44-202-87-116.compute-1.amazonaws.com': {'ansible_port': 2200, 'ansible_user': 'ubuntu', 'ansible_ssh_private_key_file': '/tmp/wazuh-qa/i-0dac7a5de0b996fa6/ubuntu-22.04-amd64-key-4157'}}}} [2024-04-26 16:23:18] [DEBUG] TESTER: Running playbook: [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test install for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_install.py -v --wazuh_version=4.7.3 --wazuh_revision=40714 --component=agent --dependencies='{}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml, agent: /tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}] No config file found; using defaults PLAY [localhost] *************************************************************** TASK [Gathering Facts] ********************************************************* ok: [localhost] TASK [Test install for agent] ************************************************** changed: [localhost] => changed=true   cmd:  - python3  - -m  - pytest  - modules/testing/tests/test_agent/test_install.py  - -v  - --wazuh_version=4.7.3  - --wazuh_revision=40714  - --component=agent  - --dependencies={}  - '--targets={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml, agent: /tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml}'  - --live=True  - -s  delta: '0:03:01.384191'  end: '2024-04-26 16:26:23.625670'  msg: ''  rc: 0  start: '2024-04-26 16:23:22.241479'  stderr: |-  Warning: Permanently added '[ec2-44-202-87-116.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.  Warning: Permanently added '[ec2-44-202-87-116.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.  stderr_lines:   stdout: |-  [37m[2024-04-26 16:23:22] [DEBUG] SPNEGO._GSS: Python gssapi not available, cannot use any GSSAPIProxy protocols: No module named 'gssapi'[0m  [37m[2024-04-26 16:23:22] [DEBUG] SPNEGO._GSS: Python gssapi IOV extension not available: No module named 'gssapi'[0m  ============================= test session starts ==============================  platform linux -- Python 3.10.12, pytest-7.4.4, pluggy-1.4.0 -- /home/akim/Desktop/venvs/dtt1/bin/python3  cachedir: .pytest_cache  rootdir: /home/akim/Desktop/wazuh-qa/deployability/modules  plugins: tinybird-0.2.0  collecting ... collected 1 item    modules/testing/tests/test_agent/test_install.py::test_installation [32m[2024-04-26 16:23:22] [INFO] TESTER: Checking connection to server-2022[0m  [32m[2024-04-26 16:23:24] [INFO] TESTER: WinRM connection successful.[0m  [32m[2024-04-26 16:23:26] [INFO] TESTER: Checking connection to ubuntu-22.04[0m  [32m[2024-04-26 16:23:27] [INFO] TESTER: Connection established successfully in ubuntu-22.04[0m  [32m[2024-04-26 16:23:27] [INFO] TESTER: Firewall disabled on server-2022[0m  [32m[2024-04-26 16:23:35] [INFO] TESTER: Manager is already installed in ubuntu-22.04[0m  [32m[2024-04-26 16:23:37] [INFO] TESTER: Generating Snapshot for Checkfile in server-2022[0m  [32m[2024-04-26 16:24:51] [INFO] TESTER: Installing Agent in server-2022[0m  [32m[2024-04-26 16:25:09] [INFO] TESTER: Generating Snapshot for Checkfile in server-2022[0m  [32m[2024-04-26 16:26:23] [INFO] TESTER: Applying filters in checkfiles in server-2022[0m  [32m[2024-04-26 16:26:23] [INFO] TESTER: Pre and post install checkfile comparison in server-2022: {'C:\\Program Files': {'added': [], 'removed': [], 'modified': []}, 'C:\\Program Files (x86)': {'added': [], 'removed': [], 'modified': []}, 'C:\\Users\\vagrant': {'added': [], 'removed': [], 'modified': []}}[0m  PASSED    =============================== warnings summary ===============================  modules/provision/models.py:36  /home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:36: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/  @validator('dependencies', pre=True)    modules/provision/models.py:64  /home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:64: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/  @validator('install', 'uninstall', pre=True)    testing/tests/test_agent/test_install.py: 12 warnings  /home/akim/Desktop/venvs/dtt1/lib/python3.10/site-packages/winrm/transport.py:349: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()  argspec = set(inspect.getargspec(function).args)    -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html  ================== 1 passed, 14 warnings in 180.41s (0:03:00) ==================  stdout_lines:  PLAY RECAP ********************************************************************* localhost : ok=2  changed=1  unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 [2024-04-26 16:26:23] [DEBUG] TESTER: Playbook [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test install for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_install.py -v --wazuh_version=4.7.3 --wazuh_revision=40714 --component=agent --dependencies='{}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml, agent: /tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}] finished with status {'skipped': {}, 'ok': {'localhost': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'localhost': 1}, 'changed': {'localhost': 1}} [2024-04-26 16:26:23] [DEBUG] TESTER: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/test.yml [2024-04-26 16:26:23] [DEBUG] TESTER: Using inventory: {'all': {'hosts': {'ec2-44-202-87-116.compute-1.amazonaws.com': {'ansible_port': 2200, 'ansible_user': 'ubuntu', 'ansible_ssh_private_key_file': '/tmp/wazuh-qa/i-0dac7a5de0b996fa6/ubuntu-22.04-amd64-key-4157'}}}} [2024-04-26 16:26:23] [DEBUG] TESTER: Running playbook: [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test registration for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_registration.py -v --wazuh_version=4.7.3 --wazuh_revision=40714 --component=agent --dependencies='{}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml, agent: /tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}] No config file found; using defaults PLAY [localhost] *************************************************************** TASK [Gathering Facts] ********************************************************* ok: [localhost] TASK [Test registration for agent] ********************************************* changed: [localhost] => changed=true   cmd:  - python3  - -m  - pytest  - modules/testing/tests/test_agent/test_registration.py  - -v  - --wazuh_version=4.7.3  - --wazuh_revision=40714  - --component=agent  - --dependencies={}  - '--targets={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml, agent: /tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml}'  - --live=True  - -s  delta: '0:01:41.979518'  end: '2024-04-26 16:28:13.313155'  msg: ''  rc: 0  start: '2024-04-26 16:26:31.333637'  stderr: |-  Warning: Permanently added '[ec2-44-202-87-116.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.  Warning: Permanently added '[ec2-44-202-87-116.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.  Warning: Permanently added '[ec2-44-202-87-116.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.  Warning: Permanently added '[ec2-44-202-87-116.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.  Warning: Permanently added '[ec2-44-202-87-116.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.  Warning: Permanently added '[ec2-44-202-87-116.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.  Warning: Permanently added '[ec2-44-202-87-116.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.  stderr_lines:   stdout: |-  [37m[2024-04-26 16:26:31] [DEBUG] SPNEGO._GSS: Python gssapi not available, cannot use any GSSAPIProxy protocols: No module named 'gssapi'[0m  [37m[2024-04-26 16:26:31] [DEBUG] SPNEGO._GSS: Python gssapi IOV extension not available: No module named 'gssapi'[0m  ============================= test session starts ==============================  platform linux -- Python 3.10.12, pytest-7.4.4, pluggy-1.4.0 -- /home/akim/Desktop/venvs/dtt1/bin/python3  cachedir: .pytest_cache  rootdir: /home/akim/Desktop/wazuh-qa/deployability/modules  plugins: tinybird-0.2.0  collecting ... collected 4 items    modules/testing/tests/test_agent/test_registration.py::test_status [32m[2024-04-26 16:26:32] [INFO] TESTER: Checking connection to server-2022[0m  [32m[2024-04-26 16:26:33] [INFO] TESTER: WinRM connection successful.[0m  [32m[2024-04-26 16:26:40] [INFO] TESTER: os_type windows[0m  [32m[2024-04-26 16:26:49] [INFO] TESTER: Getting status of server-2022[0m  PASSED  modules/testing/tests/test_agent/test_registration.py::test_service PASSED  modules/testing/tests/test_agent/test_registration.py::test_connection PASSED  modules/testing/tests/test_agent/test_registration.py::test_clientKeys PASSED    =============================== warnings summary ===============================  modules/provision/models.py:36  /home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:36: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/  @validator('dependencies', pre=True)    modules/provision/models.py:64  /home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:64: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/  @validator('install', 'uninstall', pre=True)    testing/tests/test_agent/test_registration.py: 10 warnings  /home/akim/Desktop/venvs/dtt1/lib/python3.10/site-packages/winrm/transport.py:349: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()  argspec = set(inspect.getargspec(function).args)    -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html  ================== 4 passed, 12 warnings in 101.02s (0:01:41) ==================  stdout_lines:  PLAY RECAP ********************************************************************* localhost : ok=2  changed=1  unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 [2024-04-26 16:28:13] [DEBUG] TESTER: Playbook [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test registration for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_registration.py -v --wazuh_version=4.7.3 --wazuh_revision=40714 --component=agent --dependencies='{}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml, agent: /tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}] finished with status {'skipped': {}, 'ok': {'localhost': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'localhost': 1}, 'changed': {'localhost': 1}} [2024-04-26 16:28:13] [DEBUG] TESTER: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/test.yml [2024-04-26 16:28:13] [DEBUG] TESTER: Using inventory: {'all': {'hosts': {'ec2-44-202-87-116.compute-1.amazonaws.com': {'ansible_port': 2200, 'ansible_user': 'ubuntu', 'ansible_ssh_private_key_file': '/tmp/wazuh-qa/i-0dac7a5de0b996fa6/ubuntu-22.04-amd64-key-4157'}}}} [2024-04-26 16:28:13] [DEBUG] TESTER: Running playbook: [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test connection for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_connection.py -v --wazuh_version=4.7.3 --wazuh_revision=40714 --component=agent --dependencies='{}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml, agent: /tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}] No config file found; using defaults PLAY [localhost] *************************************************************** TASK [Gathering Facts] ********************************************************* ok: [localhost] TASK [Test connection for agent] *********************************************** changed: [localhost] => changed=true   cmd:  - python3  - -m  - pytest  - modules/testing/tests/test_agent/test_connection.py  - -v  - --wazuh_version=4.7.3  - --wazuh_revision=40714  - --component=agent  - --dependencies={}  - '--targets={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml, agent: /tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml}'  - --live=True  - -s  delta: '0:00:36.954533'  end: '2024-04-26 16:28:56.903693'  msg: ''  rc: 0  start: '2024-04-26 16:28:19.949160'  stderr: |-  Warning: Permanently added '[ec2-44-202-87-116.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.  Warning: Permanently added '[ec2-44-202-87-116.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.  Warning: Permanently added '[ec2-44-202-87-116.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.  Warning: Permanently added '[ec2-44-202-87-116.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.  Warning: Permanently added '[ec2-44-202-87-116.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.  Warning: Permanently added '[ec2-44-202-87-116.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.  Warning: Permanently added '[ec2-44-202-87-116.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.  stderr_lines:   stdout: |-  [37m[2024-04-26 16:28:20] [DEBUG] SPNEGO._GSS: Python gssapi not available, cannot use any GSSAPIProxy protocols: No module named 'gssapi'[0m  [37m[2024-04-26 16:28:20] [DEBUG] SPNEGO._GSS: Python gssapi IOV extension not available: No module named 'gssapi'[0m  ============================= test session starts ==============================  platform linux -- Python 3.10.12, pytest-7.4.4, pluggy-1.4.0 -- /home/akim/Desktop/venvs/dtt1/bin/python3  cachedir: .pytest_cache  rootdir: /home/akim/Desktop/wazuh-qa/deployability/modules  plugins: tinybird-0.2.0  collecting ... collected 6 items    modules/testing/tests/test_agent/test_connection.py::test_connection [32m[2024-04-26 16:28:20] [INFO] TESTER: Checking connection to server-2022[0m  [32m[2024-04-26 16:28:22] [INFO] TESTER: WinRM connection successful.[0m  PASSED  modules/testing/tests/test_agent/test_connection.py::test_status [32m[2024-04-26 16:28:40] [INFO] TESTER: Getting status of server-2022[0m  PASSED  modules/testing/tests/test_agent/test_connection.py::test_service PASSED  modules/testing/tests/test_agent/test_connection.py::test_clientKeys PASSED  modules/testing/tests/test_agent/test_connection.py::test_port PASSED  modules/testing/tests/test_agent/test_connection.py::test_processes PASSED    =============================== warnings summary ===============================  modules/provision/models.py:36  /home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:36: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/  @validator('dependencies', pre=True)    modules/provision/models.py:64  /home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:64: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/  @validator('install', 'uninstall', pre=True)    testing/tests/test_agent/test_connection.py: 11 warnings  /home/akim/Desktop/venvs/dtt1/lib/python3.10/site-packages/winrm/transport.py:349: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()  argspec = set(inspect.getargspec(function).args)    -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html  ======================= 6 passed, 13 warnings in 35.90s ========================  stdout_lines:  PLAY RECAP ********************************************************************* localhost : ok=2  changed=1  unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 [2024-04-26 16:28:57] [DEBUG] TESTER: Playbook [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test connection for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_connection.py -v --wazuh_version=4.7.3 --wazuh_revision=40714 --component=agent --dependencies='{}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml, agent: /tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}] finished with status {'skipped': {}, 'ok': {'localhost': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'localhost': 1}, 'changed': {'localhost': 1}} [2024-04-26 16:28:57] [DEBUG] TESTER: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/test.yml [2024-04-26 16:28:57] [DEBUG] TESTER: Using inventory: {'all': {'hosts': {'ec2-44-202-87-116.compute-1.amazonaws.com': {'ansible_port': 2200, 'ansible_user': 'ubuntu', 'ansible_ssh_private_key_file': '/tmp/wazuh-qa/i-0dac7a5de0b996fa6/ubuntu-22.04-amd64-key-4157'}}}} [2024-04-26 16:28:57] [DEBUG] TESTER: Running playbook: [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test basic_info for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_basic_info.py -v --wazuh_version=4.7.3 --wazuh_revision=40714 --component=agent --dependencies='{}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml, agent: /tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}] No config file found; using defaults PLAY [localhost] *************************************************************** TASK [Gathering Facts] ********************************************************* ok: [localhost] TASK [Test basic_info for agent] *********************************************** changed: [localhost] => changed=true   cmd:  - python3  - -m  - pytest  - modules/testing/tests/test_agent/test_basic_info.py  - -v  - --wazuh_version=4.7.3  - --wazuh_revision=40714  - --component=agent  - --dependencies={}  - '--targets={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml, agent: /tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml}'  - --live=True  - -s  delta: '0:00:21.901629'  end: '2024-04-26 16:29:26.040254'  msg: ''  rc: 0  start: '2024-04-26 16:29:04.138625'  stderr: |-  Warning: Permanently added '[ec2-44-202-87-116.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.  Warning: Permanently added '[ec2-44-202-87-116.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.  Warning: Permanently added '[ec2-44-202-87-116.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.  stderr_lines:   stdout: |-  [37m[2024-04-26 16:29:04] [DEBUG] SPNEGO._GSS: Python gssapi not available, cannot use any GSSAPIProxy protocols: No module named 'gssapi'[0m  [37m[2024-04-26 16:29:04] [DEBUG] SPNEGO._GSS: Python gssapi IOV extension not available: No module named 'gssapi'[0m  ============================= test session starts ==============================  platform linux -- Python 3.10.12, pytest-7.4.4, pluggy-1.4.0 -- /home/akim/Desktop/venvs/dtt1/bin/python3  cachedir: .pytest_cache  rootdir: /home/akim/Desktop/wazuh-qa/deployability/modules  plugins: tinybird-0.2.0  collecting ... collected 3 items    modules/testing/tests/test_agent/test_basic_info.py::test_wazuh_os_version [32m[2024-04-26 16:29:04] [INFO] TESTER: Checking connection to server-2022[0m  [32m[2024-04-26 16:29:06] [INFO] TESTER: WinRM connection successful.[0m  PASSED  modules/testing/tests/test_agent/test_basic_info.py::test_wazuh_version PASSED  modules/testing/tests/test_agent/test_basic_info.py::test_wazuh_revision PASSED    =============================== warnings summary ===============================  modules/provision/models.py:36  /home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:36: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/  @validator('dependencies', pre=True)    modules/provision/models.py:64  /home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:64: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/  @validator('install', 'uninstall', pre=True)    testing/tests/test_agent/test_basic_info.py::test_wazuh_os_version  testing/tests/test_agent/test_basic_info.py::test_wazuh_os_version  testing/tests/test_agent/test_basic_info.py::test_wazuh_os_version  testing/tests/test_agent/test_basic_info.py::test_wazuh_os_version  testing/tests/test_agent/test_basic_info.py::test_wazuh_os_version  testing/tests/test_agent/test_basic_info.py::test_wazuh_version  testing/tests/test_agent/test_basic_info.py::test_wazuh_revision  /home/akim/Desktop/venvs/dtt1/lib/python3.10/site-packages/winrm/transport.py:349: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()  argspec = set(inspect.getargspec(function).args)    -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html  ======================== 3 passed, 9 warnings in 20.99s ========================  stdout_lines:  PLAY RECAP ********************************************************************* localhost : ok=2  changed=1  unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 [2024-04-26 16:29:26] [DEBUG] TESTER: Playbook [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test basic_info for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_basic_info.py -v --wazuh_version=4.7.3 --wazuh_revision=40714 --component=agent --dependencies='{}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml, agent: /tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}] finished with status {'skipped': {}, 'ok': {'localhost': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'localhost': 1}, 'changed': {'localhost': 1}} [2024-04-26 16:29:26] [DEBUG] TESTER: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/test.yml [2024-04-26 16:29:26] [DEBUG] TESTER: Using inventory: {'all': {'hosts': {'ec2-44-202-87-116.compute-1.amazonaws.com': {'ansible_port': 2200, 'ansible_user': 'ubuntu', 'ansible_ssh_private_key_file': '/tmp/wazuh-qa/i-0dac7a5de0b996fa6/ubuntu-22.04-amd64-key-4157'}}}} [2024-04-26 16:29:26] [DEBUG] TESTER: Running playbook: [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test stop for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_stop.py -v --wazuh_version=4.7.3 --wazuh_revision=40714 --component=agent --dependencies='{}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml, agent: /tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}] No config file found; using defaults PLAY [localhost] *************************************************************** TASK [Gathering Facts] ********************************************************* ok: [localhost] TASK [Test stop for agent] ***************************************************** changed: [localhost] => changed=true   cmd:  - python3  - -m  - pytest  - modules/testing/tests/test_agent/test_stop.py  - -v  - --wazuh_version=4.7.3  - --wazuh_revision=40714  - --component=agent  - --dependencies={}  - '--targets={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml, agent: /tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml}'  - --live=True  - -s  delta: '0:00:30.489561'  end: '2024-04-26 16:30:03.228753'  msg: ''  rc: 0  start: '2024-04-26 16:29:32.739192'  stderr: |-  Warning: Permanently added '[ec2-44-202-87-116.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.  Warning: Permanently added '[ec2-44-202-87-116.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.  Warning: Permanently added '[ec2-44-202-87-116.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.  stderr_lines:   stdout: |-  [37m[2024-04-26 16:29:33] [DEBUG] SPNEGO._GSS: Python gssapi not available, cannot use any GSSAPIProxy protocols: No module named 'gssapi'[0m  [37m[2024-04-26 16:29:33] [DEBUG] SPNEGO._GSS: Python gssapi IOV extension not available: No module named 'gssapi'[0m  ============================= test session starts ==============================  platform linux -- Python 3.10.12, pytest-7.4.4, pluggy-1.4.0 -- /home/akim/Desktop/venvs/dtt1/bin/python3  cachedir: .pytest_cache  rootdir: /home/akim/Desktop/wazuh-qa/deployability/modules  plugins: tinybird-0.2.0  collecting ... collected 3 items    modules/testing/tests/test_agent/test_stop.py::test_service [32m[2024-04-26 16:29:33] [INFO] TESTER: Checking connection to server-2022[0m  [32m[2024-04-26 16:29:35] [INFO] TESTER: WinRM connection successful.[0m  [32m[2024-04-26 16:29:47] [INFO] TESTER: Stopping wazuh-agent in server-2022[0m  [32m[2024-04-26 16:29:49] [INFO] TESTER: Getting status of server-2022[0m  PASSED  modules/testing/tests/test_agent/test_stop.py::test_port PASSED  modules/testing/tests/test_agent/test_stop.py::test_processes PASSED[32m[2024-04-26 16:29:56] [INFO] TESTER: Restarting wazuh-agent in server-2022[0m      =============================== warnings summary ===============================  modules/provision/models.py:36  /home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:36: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/  @validator('dependencies', pre=True)    modules/provision/models.py:64  /home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:64: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/  @validator('install', 'uninstall', pre=True)    testing/tests/test_agent/test_stop.py: 10 warnings  /home/akim/Desktop/venvs/dtt1/lib/python3.10/site-packages/winrm/transport.py:349: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()  argspec = set(inspect.getargspec(function).args)    -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html  ======================= 3 passed, 12 warnings in 29.56s ========================  stdout_lines:  PLAY RECAP ********************************************************************* localhost : ok=2  changed=1  unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 [2024-04-26 16:30:03] [DEBUG] TESTER: Playbook [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test stop for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_stop.py -v --wazuh_version=4.7.3 --wazuh_revision=40714 --component=agent --dependencies='{}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml, agent: /tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}] finished with status {'skipped': {}, 'ok': {'localhost': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'localhost': 1}, 'changed': {'localhost': 1}} [2024-04-26 16:30:03] [DEBUG] TESTER: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/test.yml [2024-04-26 16:30:03] [DEBUG] TESTER: Using inventory: {'all': {'hosts': {'ec2-44-202-87-116.compute-1.amazonaws.com': {'ansible_port': 2200, 'ansible_user': 'ubuntu', 'ansible_ssh_private_key_file': '/tmp/wazuh-qa/i-0dac7a5de0b996fa6/ubuntu-22.04-amd64-key-4157'}}}} [2024-04-26 16:30:03] [DEBUG] TESTER: Running playbook: [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test restart for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_restart.py -v --wazuh_version=4.7.3 --wazuh_revision=40714 --component=agent --dependencies='{}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml, agent: /tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}] No config file found; using defaults PLAY [localhost] *************************************************************** TASK [Gathering Facts] ********************************************************* ok: [localhost] TASK [Test restart for agent] ************************************************** changed: [localhost] => changed=true   cmd:  - python3  - -m  - pytest  - modules/testing/tests/test_agent/test_restart.py  - -v  - --wazuh_version=4.7.3  - --wazuh_revision=40714  - --component=agent  - --dependencies={}  - '--targets={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml, agent: /tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml}'  - --live=True  - -s  delta: '0:00:27.821982'  end: '2024-04-26 16:30:38.061153'  msg: ''  rc: 0  start: '2024-04-26 16:30:10.239171'  stderr: 'Warning: Permanently added ''[ec2-44-202-87-116.compute-1.amazonaws.com]:2200'' (ED25519) to the list of known hosts.'  stderr_lines:   stdout: |-  [37m[2024-04-26 16:30:10] [DEBUG] SPNEGO._GSS: Python gssapi not available, cannot use any GSSAPIProxy protocols: No module named 'gssapi'[0m  [37m[2024-04-26 16:30:10] [DEBUG] SPNEGO._GSS: Python gssapi IOV extension not available: No module named 'gssapi'[0m  ============================= test session starts ==============================  platform linux -- Python 3.10.12, pytest-7.4.4, pluggy-1.4.0 -- /home/akim/Desktop/venvs/dtt1/bin/python3  cachedir: .pytest_cache  rootdir: /home/akim/Desktop/wazuh-qa/deployability/modules  plugins: tinybird-0.2.0  collecting ... collected 7 items    modules/testing/tests/test_agent/test_restart.py::test_restart [32m[2024-04-26 16:30:11] [INFO] TESTER: Checking connection to server-2022[0m  [32m[2024-04-26 16:30:12] [INFO] TESTER: WinRM connection successful.[0m  [32m[2024-04-26 16:30:19] [INFO] TESTER: Restarting wazuh-agent in server-2022[0m  PASSED  modules/testing/tests/test_agent/test_restart.py::test_status [32m[2024-04-26 16:30:26] [INFO] TESTER: Getting status of server-2022[0m  PASSED  modules/testing/tests/test_agent/test_restart.py::test_connection PASSED  modules/testing/tests/test_agent/test_restart.py::test_isActive PASSED  modules/testing/tests/test_agent/test_restart.py::test_clientKeys PASSED  modules/testing/tests/test_agent/test_restart.py::test_port PASSED  modules/testing/tests/test_agent/test_restart.py::test_processes PASSED    =============================== warnings summary ===============================  modules/provision/models.py:36  /home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:36: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/  @validator('dependencies', pre=True)    modules/provision/models.py:64  /home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:64: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/  @validator('install', 'uninstall', pre=True)    testing/tests/test_agent/test_restart.py: 11 warnings  /home/akim/Desktop/venvs/dtt1/lib/python3.10/site-packages/winrm/transport.py:349: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()  argspec = set(inspect.getargspec(function).args)    -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html  ======================= 7 passed, 13 warnings in 26.78s ========================  stdout_lines:  PLAY RECAP ********************************************************************* localhost : ok=2  changed=1  unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 [2024-04-26 16:30:38] [DEBUG] TESTER: Playbook [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test restart for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_restart.py -v --wazuh_version=4.7.3 --wazuh_revision=40714 --component=agent --dependencies='{}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml, agent: /tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}] finished with status {'skipped': {}, 'ok': {'localhost': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'localhost': 1}, 'changed': {'localhost': 1}} [2024-04-26 16:30:38] [DEBUG] TESTER: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/test.yml [2024-04-26 16:30:38] [DEBUG] TESTER: Using inventory: {'all': {'hosts': {'ec2-44-202-87-116.compute-1.amazonaws.com': {'ansible_port': 2200, 'ansible_user': 'ubuntu', 'ansible_ssh_private_key_file': '/tmp/wazuh-qa/i-0dac7a5de0b996fa6/ubuntu-22.04-amd64-key-4157'}}}} [2024-04-26 16:30:38] [DEBUG] TESTER: Running playbook: [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test uninstall for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_uninstall.py -v --wazuh_version=4.7.3 --wazuh_revision=40714 --component=agent --dependencies='{}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml, agent: /tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}] No config file found; using defaults PLAY [localhost] *************************************************************** TASK [Gathering Facts] ********************************************************* ok: [localhost] TASK [Test uninstall for agent] ************************************************ changed: [localhost] => changed=true   cmd:  - python3  - -m  - pytest  - modules/testing/tests/test_agent/test_uninstall.py  - -v  - --wazuh_version=4.7.3  - --wazuh_revision=40714  - --component=agent  - --dependencies={}  - '--targets={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml, agent: /tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml}'  - --live=True  - -s  delta: '0:07:53.696669'  end: '2024-04-26 16:38:38.636493'  msg: ''  rc: 0  start: '2024-04-26 16:30:44.939824'  stderr: |-  Warning: Permanently added '[ec2-44-202-87-116.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.  Warning: Permanently added '[ec2-44-202-87-116.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.  Warning: Permanently added '[ec2-44-202-87-116.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.  Warning: Permanently added '[ec2-44-202-87-116.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.  stderr_lines:   stdout: |-  [37m[2024-04-26 16:30:45] [DEBUG] SPNEGO._GSS: Python gssapi not available, cannot use any GSSAPIProxy protocols: No module named 'gssapi'[0m  [37m[2024-04-26 16:30:45] [DEBUG] SPNEGO._GSS: Python gssapi IOV extension not available: No module named 'gssapi'[0m  ============================= test session starts ==============================  platform linux -- Python 3.10.12, pytest-7.4.4, pluggy-1.4.0 -- /home/akim/Desktop/venvs/dtt1/bin/python3  cachedir: .pytest_cache  rootdir: /home/akim/Desktop/wazuh-qa/deployability/modules  plugins: tinybird-0.2.0  collecting ... collected 5 items    modules/testing/tests/test_agent/test_uninstall.py::test_uninstall [32m[2024-04-26 16:30:45] [INFO] TESTER: Checking connection to server-2022[0m  [32m[2024-04-26 16:30:48] [INFO] TESTER: WinRM connection successful.[0m  [32m[2024-04-26 16:30:58] [INFO] TESTER: Generating Snapshot for Checkfile in server-2022[0m  [32m[2024-04-26 16:37:03] [INFO] TESTER: Uninstalling Agent in server-2022[0m  [32m[2024-04-26 16:37:14] [INFO] TESTER: Generating Snapshot for Checkfile in server-2022[0m  [32m[2024-04-26 16:38:19] [INFO] TESTER: Applying filters in checkfiles in server-2022[0m  [32m[2024-04-26 16:38:19] [INFO] TESTER: Pre and post uninstall checkfile comparison in server-2022: {'C:\\Program Files': {'added': [], 'removed': [], 'modified': []}, 'C:\\Program Files (x86)': {'added': [], 'removed': [], 'modified': []}, 'C:\\Users\\vagrant': {'added': [], 'removed': [], 'modified': []}}[0m  PASSED  modules/testing/tests/test_agent/test_uninstall.py::test_agent_uninstalled_directory PASSED  modules/testing/tests/test_agent/test_uninstall.py::test_service PASSED  modules/testing/tests/test_agent/test_uninstall.py::test_port PASSED  modules/testing/tests/test_agent/test_uninstall.py::test_processes PASSED    =============================== warnings summary ===============================  modules/provision/models.py:36  /home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:36: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/  @validator('dependencies', pre=True)    modules/provision/models.py:64  /home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:64: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/  @validator('install', 'uninstall', pre=True)    modules/testing/tests/helpers/agent.py:59  /home/akim/Desktop/wazuh-qa/deployability/modules/testing/tests/helpers/agent.py:59: DeprecationWarning: invalid escape sequence '\w'  "-OutFile $env:TEMP\wazuh-agent.msi"    modules/testing/tests/helpers/agent.py:62  /home/akim/Desktop/wazuh-qa/deployability/modules/testing/tests/helpers/agent.py:62: DeprecationWarning: invalid escape sequence '\w'  "msiexec.exe /i $env:TEMP\wazuh-agent.msi /q "    modules/testing/tests/helpers/agent.py:107  modules/testing/tests/helpers/agent.py:107  /home/akim/Desktop/wazuh-qa/deployability/modules/testing/tests/helpers/agent.py:107: DeprecationWarning: invalid escape sequence '\/'  f"sed -i 's/
MANAGER_IP<\/address>/
{internal_ip}<\/address>/g' {WAZUH_CONF}",    modules/testing/tests/helpers/agent.py:134  modules/testing/tests/helpers/agent.py:134  /home/akim/Desktop/wazuh-qa/deployability/modules/testing/tests/helpers/agent.py:134: DeprecationWarning: invalid escape sequence '\/'  f"sed -i 's/[^<]*<\/protocol>/{protocol}<\/protocol>/g' {WAZUH_CONF}",    modules/testing/tests/helpers/agent.py:143  /home/akim/Desktop/wazuh-qa/deployability/modules/testing/tests/helpers/agent.py:143: DeprecationWarning: invalid escape sequence '\/'  f"(Get-Content -Path '{WAZUH_WINDOWS_CONF}') -replace '[^<]*<\/protocol>', '{protocol}' | Set-Content -Path '{WAZUH_WINDOWS_CONF}'"    modules/testing/tests/helpers/agent.py:184  /home/akim/Desktop/wazuh-qa/deployability/modules/testing/tests/helpers/agent.py:184: DeprecationWarning: invalid escape sequence '\w'  f"msiexec.exe /x $env:TEMP\wazuh-agent.msi /qn"    testing/tests/test_agent/test_uninstall.py: 17 warnings  /home/akim/Desktop/venvs/dtt1/lib/python3.10/site-packages/winrm/transport.py:349: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()  argspec = set(inspect.getargspec(function).args)    -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html  ================== 5 passed, 27 warnings in 472.77s (0:07:52) ==================  stdout_lines:  PLAY RECAP ********************************************************************* localhost : ok=2  changed=1  unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 [2024-04-26 16:38:38] [DEBUG] TESTER: Playbook [{'hosts': 'localhost', 'become': True, 'become_user': 'akim', 'tasks': [{'name': 'Test uninstall for agent', 'command': "python3 -m pytest modules/testing/tests/test_agent/test_uninstall.py -v --wazuh_version=4.7.3 --wazuh_revision=40714 --component=agent --dependencies='{}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yaml, agent: /tmp/dtt1-poc/agent-windows-server-2022-amd64/inventory.yaml}' --live=True -s", 'args': {'chdir': '/home/akim/Desktop/wazuh-qa/deployability'}}]}] finished with status {'skipped': {}, 'ok': {'localhost': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'localhost': 1}, 'changed': {'localhost': 1}} [2024-04-26 16:38:38] [INFO] TESTER: Cleaning up [2024-04-26 16:38:38] [DEBUG] TESTER: Using inventory: {'all': {'hosts': {'ec2-44-202-87-116.compute-1.amazonaws.com': {'ansible_port': 2200, 'ansible_user': 'ubuntu', 'ansible_ssh_private_key_file': '/tmp/wazuh-qa/i-0dac7a5de0b996fa6/ubuntu-22.04-amd64-key-4157'}}}} [2024-04-26 16:38:38] [DEBUG] TESTER: Running playbook: /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/cleanup.yml No config file found; using defaults PLAY [all] ********************************************************************* TASK [Gathering Facts] ********************************************************* ok: [ec2-44-202-87-116.compute-1.amazonaws.com] TASK [Clean test directory] **************************************************** ok: [ec2-44-202-87-116.compute-1.amazonaws.com] => changed=false   path: /tmp/tests  state: absent PLAY RECAP ********************************************************************* ec2-44-202-87-116.compute-1.amazonaws.com : ok=2  changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 [2024-04-26 16:38:48] [DEBUG] TESTER: Playbook /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/cleanup.yml finished with status {'skipped': {}, 'ok': {'ec2-44-202-87-116.compute-1.amazonaws.com': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'ec2-44-202-87-116.compute-1.amazonaws.com': 1}, 'changed': {}} [2024-04-26 16:38:48] [INFO] TESTER: Cleaning up [2024-04-26 16:38:48] [DEBUG] TESTER: Using inventory: {'all': {'hosts': {'ec2-44-202-87-116.compute-1.amazonaws.com': {'ansible_port': 2200, 'ansible_user': 'ubuntu', 'ansible_ssh_private_key_file': '/tmp/wazuh-qa/i-0dac7a5de0b996fa6/ubuntu-22.04-amd64-key-4157'}}}} [2024-04-26 16:38:48] [DEBUG] TESTER: Running playbook: /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/cleanup.yml No config file found; using defaults PLAY [all] ********************************************************************* TASK [Gathering Facts] ********************************************************* ok: [ec2-44-202-87-116.compute-1.amazonaws.com] TASK [Clean test directory] **************************************************** ok: [ec2-44-202-87-116.compute-1.amazonaws.com] => changed=false   path: /tmp/tests  state: absent PLAY RECAP ********************************************************************* ec2-44-202-87-116.compute-1.amazonaws.com : ok=2  changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 [2024-04-26 16:38:55] [DEBUG] TESTER: Playbook /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/cleanup.yml finished with status {'skipped': {}, 'ok': {'ec2-44-202-87-116.compute-1.amazonaws.com': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'ec2-44-202-87-116.compute-1.amazonaws.com': 1}, 'changed': {}} [2024-04-26 16:38:56,064] [INFO] [117037] [ThreadPoolExecutor-0_0] [workflow_engine]: [run-agent-windows-server-2022-amd64-tests] Finished task in 944.55 seconds. [2024-04-26 16:38:56,070] [INFO] [117037] [MainThread] [workflow_engine]: Executing Reverse DAG tasks. [2024-04-26 16:38:56,070] [INFO] [117037] [MainThread] [workflow_engine]: Executing tasks in parallel. ```