-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DTT1 - Iteration 3 - Test module - Improve Wazuh agent tests #4843
Comments
Update reportCreated a small library to handle WazuhAPI requests and responses with the purpose of simplifying the API testing for current and future tests. The library contains three files and for now is included inside the tests helpers, later, if its approved it could be configured to be an installable library. Files:
|
Update reportAbout
|
ReviewAll test LGTM The item |
UpdateIn the evaluation and development of the best model for performing checkfiles |
UpdateFirst of all, it was determined in the discussion with the team that the installation and uninstallation tests should consider the installation and uninstallation of components within the test module itself. On the other hand, we will investigate how to instrument the checkfile. Steps to follow:
Research about check-filesIt is clear that to achieve the check-file, we will have to take a snapshot of the directories and files before and after the 'action'. Linux/MacOS Options
Windows Options
Define tests that will be done and their sequence of action
Reference:
If the workflow does not require the In case the Research actionsAgent: InstallLinux
curl -o wazuh-agent-{ wazuh_version }-{ wazuh_revision }.x86_64.rpm https://{ aws s3 }.wazuh.com/{ repository }/yum/wazuh-agent-{ wazuh_version }-{ wazuh_revision }.x86_64.rpm && sudo WAZUH_MANAGER='{ dependency_ip }' rpm -ihv wazuh-agent-4.7.2-1.x86_64.rpm
curl -o wazuh-agent-{ wazuh_version }-{ wazuh_revision }.aarch64.rpm https://{ aws s3 }.wazuh.com/{ repository }/yum/wazuh-agent-{ wazuh_version }-{ wazuh_revision }.aarch64.rpm && sudo WAZUH_MANAGER='{ dependency_ip }' rpm -ihv wazuh-agent-{ wazuh_version }-{ wazuh_revision }.aarch64.rpm
wget https://https://{ aws s3 }.wazuh.com/{ repository }/apt/pool/main/w/wazuh-agent/wazuh-agent_{ wazuh_version }-{ wazuh_revision }_amd64.deb && sudo WAZUH_MANAGER='{ dependency_ip }' dpkg -i ./wazuh-agent_{ wazuh_version }-{ wazuh_revision }_amd64.deb
wget https://https://{ aws s3 }.wazuh.com/{ repository }/apt/pool/main/w/wazuh-agent/wazuh-agent_{ wazuh_version }-{ wazuh_revision }_arm64.deb && sudo WAZUH_MANAGER='{ dependency_ip }' dpkg -i ./wazuh-agent_{ wazuh_version }-{ wazuh_revision }_arm64.deb After install the agent, in all linux OS: sudo systemctl daemon-reload
sudo systemctl enable wazuh-agent
sudo systemctl start wazuh-agent WindowsInvoke-WebRequest -Uri https://https://{ aws s3 }.wazuh.com/{ repository }/windows/wazuh-agent-{ wazuh_version }-{ wazuh_revision }.msi -OutFile ${env.tmp}\wazuh-agent; msiexec.exe /i ${env.tmp}\wazuh-agent /q WAZUH_MANAGER='{ dependency_ip }' WAZUH_REGISTRATION_SERVER='{ dependency_ip }' After install the agent, in all Windows OS: NET START WazuhSvc MacOS
curl -so wazuh-agent.pkg https://https://{ aws s3 }.wazuh.com/{ repository }/macos/wazuh-agent-{ wazuh_version }-{ wazuh_revision }.intel64.pkg && echo "WAZUH_MANAGER='{ dependency_ip }'" > /tmp/wazuh_envs && sudo installer -pkg ./wazuh-agent.pkg -target /
curl -so wazuh-agent.pkg https://https://{ aws s3 }.wazuh.com/{ repository }/macos/wazuh-agent-{ wazuh_version }-{ wazuh_revision }.arm64.pkg && echo "WAZUH_MANAGER='{ dependency_ip }'" > /tmp/wazuh_envs && sudo installer -pkg ./wazuh-agent.pkg -target / After install the agent, in all MacOS OS: sudo /Library/Ossec/bin/wazuh-control start UninstallLinuxyum remove wazuh-agent apt-get remove wazuh-agent
apt-get remove --purge wazuh-agent After uninstall the agent, in all linux OS: systemctl disable wazuh-agent
systemctl daemon-reload Windowsmsiexec.exe /x wazuh-agent-{ wazuh_version }-{ wazuh_revision }.msi /qn MacOS/Library/Ossec/bin/wazuh-control stop
/bin/rm -r /Library/Ossec
/bin/launchctl unload /Library/LaunchDaemons/com.wazuh.agent.plist
/bin/rm -f /Library/LaunchDaemons/com.wazuh.agent.plist
/bin/rm -rf /Library/StartupItems/WAZUH
/usr/bin/dscl . -delete "/Users/wazuh"
/usr/bin/dscl . -delete "/Groups/wazuh"
/usr/sbin/pkgutil --forget com.wazuh.pkg.wazuh-agent |
UpdateNotes
This issue was fixed by adding setup steps to playbooks/setup.yml
FilecheckWorking with a file and directory counter in a large directory can pose challenges. Other modifications may result in alterations to the count, leading to the possibility of false negatives in the test. It will be necessary to establish pre and post-installation validation criteria. After communicating with @fcaffieri , it was defined that the Filecheck should be global. Doing some research, the following method was found: Script
Installation test:
Uninstall
Still some issues around file reading happened, however, the method is detecting the changes in a specific directory |
UpdateSome changes have been done in the check-file comparison function: Install scenario:
Number of files added:
Print results
Uninstall scenario:
Number of files deleted:
Print results
This would make us understand that using the number of files is not a good idea. The criteria to be used must be defined. |
UpdateMoving to an issue with higher priority. |
UpdateConsidering the highlighted point in #4843 (comment), depending on the test, the provision should receive variables from installing only the manager, only the dependencies and libraries or those tasks should be handled by the test module as well. This point should be discussed with the team. Another problem is that the test module commands are executed in the agent. After some discussion with the team. The manager will be installed by the provision. The agent by the Test module. |
UpdateTesting in AWS Some issues doing ssh to EC2 instances akim@akim-PC:/tmp$ cat dtt1-poc/manager-linux-centos-7-amd64/inventory.yaml
ansible_host: ec2-52-203-194-48.compute-1.amazonaws.com
ansible_port: 22
ansible_ssh_private_key_file: /tmp/wazuh-qa/i-03b0310c873ba50f6/wazuh-qa-51251710922782
ansible_user: ec2-user
akim@akim-PC:/tmp$ ssh -i "/tmp/wazuh-qa/i-03b0310c873ba50f6/wazuh-qa-51251710922782" [email protected]
ssh: connect to host ec2-52-203-194-48.compute-1.amazonaws.com port 22: Connection timed out
akim@akim-PC:/tmp$ cat /tmp/wazuh-qa/i-03b0310c873ba50f6/wazuh-qa-51251710922782
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAm/JzBA7e9yYjvrXYCDLFcErlLEZShkBGdU9PSs26uQWhaX1l
9DvAeIhECUu7B4WgJlnFacC15ScaWsuhxeMTX/fs93hTCXul1Yrq1iVjHkgBN+AV
.
.
.
It seems that there are some issues with the EC2 which host is not event possible to ping. On the other side: akim@akim-PC:/tmp$ ping ec2-52-203-194-48.compute-1.amazonaws.com
PING ec2-52-203-194-48.compute-1.amazonaws.com (52.203.194.48) 56(84) bytes of data.
^C
--- ec2-52-203-194-48.compute-1.amazonaws.com ping statistics ---
423 packets transmitted, 0 received, 100% packet loss, time 432128ms
This point will be discussed with @fcaffieri @QU3B1M and @wazuh/devel-devops team |
Meet defined: |
UpdateTesting in AWS
Result AWS 🟢(deplo_test) akim@akim-PC:~/Desktop/wazuh-qa/deployability$ python3 modules/testing/main.py --wazuh-revision '40714' --wazuh-version '4.7.3' --component 'agent' --tests 'install,registration,stop,restart,uninstall' --targets '{"wazuh-1":"/tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml"}' --targets '{"agent-1":"/tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml"}' --dependencies '{"wazuh-1":"/tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml"}' --live 'True'
component='agent' wazuh_version='4.7.3' wazuh_revision='40714' wazuh_branch=None working_dir='/tmp/tests' live=True tests=['install', 'registration', 'stop', 'restart', 'uninstall'] targets=['{"wazuh-1":"/tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml"}', '{"agent-1":"/tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml"}'] dependencies=['{"wazuh-1":"/tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml"}'] cleanup=True
[2024-03-21 12:55:30] [INFO] TESTER: Running tests for ec2-54-162-7-172.compute-1.amazonaws.com
[2024-03-21 12:55:30] [INFO] TESTER: Running tests for ec2-54-144-42-190.compute-1.amazonaws.com
[2024-03-21 12:55:30] [INFO] TESTER: Dependencies ec2-54-162-7-172.compute-1.amazonaws.com
[2024-03-21 12:55:30] [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-54-162-7-172.compute-1.amazonaws.com', 'ec2-54-144-42-190.compute-1.amazonaws.com'], 'targets': '{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}', 'dependencies': '{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}', 'local_host_path': '/home/akim/Desktop/wazuh-qa/deployability', 'current_user': 'akim'}
[2024-03-21 12:55:30] [DEBUG] ANSIBLE: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/setup.yml
[2024-03-21 12:55:30] [DEBUG] ANSIBLE: Using inventory: {'all': {'hosts': {'ec2-54-162-7-172.compute-1.amazonaws.com': {'ansible_port': 2200, 'ansible_user': 'ubuntu', 'ansible_ssh_private_key_file': '/home/akim/Desktop/personal/Ephemeral'}}}}
[2024-03-21 12:55:30] [DEBUG] ANSIBLE: 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-54-162-7-172.compute-1.amazonaws.com', 'ec2-54-144-42-190.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-54-162-7-172.compute-1.amazonaws.com) => changed=true
ansible_loop_var: item
cmd:
- ssh-keygen
- -f
- /home/akim/.ssh/known_hosts
- -R
- ''
delta: '0:00:00.009056'
end: '2024-03-21 12:55:35.643749'
item: ec2-54-162-7-172.compute-1.amazonaws.com
msg: ''
rc: 0
start: '2024-03-21 12:55:35.634693'
stderr: Host not found in /home/akim/.ssh/known_hosts
stderr_lines: <omitted>
stdout: ''
stdout_lines: <omitted>
changed: [localhost] => (item=ec2-54-144-42-190.compute-1.amazonaws.com) => changed=true
ansible_loop_var: item
cmd:
- ssh-keygen
- -f
- /home/akim/.ssh/known_hosts
- -R
- ''
delta: '0:00:00.009188'
end: '2024-03-21 12:55:35.807755'
item: ec2-54-144-42-190.compute-1.amazonaws.com
msg: ''
rc: 0
start: '2024-03-21 12:55:35.798567'
stderr: Host not found in /home/akim/.ssh/known_hosts
stderr_lines: <omitted>
stdout: ''
stdout_lines: <omitted>
PLAY RECAP *********************************************************************
localhost : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
[2024-03-21 12:55:36] [DEBUG] ANSIBLE: 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-54-162-7-172.compute-1.amazonaws.com', 'ec2-54-144-42-190.compute-1.amazonaws.com']}]}] finished with status {'skipped': {}, 'ok': {'localhost': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'localhost': 1}, 'changed': {'localhost': 1}}
[2024-03-21 12:55:36] [DEBUG] ANSIBLE: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/test.yml
[2024-03-21 12:55:36] [DEBUG] ANSIBLE: Using inventory: {'all': {'hosts': {'ec2-54-162-7-172.compute-1.amazonaws.com': {'ansible_port': 2200, 'ansible_user': 'ubuntu', 'ansible_ssh_private_key_file': '/home/akim/Desktop/personal/Ephemeral'}}}}
[2024-03-21 12:55:36] [DEBUG] ANSIBLE: 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='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --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={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}'
- '--targets={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}'
- --live=True
- -s
delta: '0:02:36.220494'
end: '2024-03-21 12:58:15.132643'
msg: ''
rc: 0
start: '2024-03-21 12:55:38.912149'
stderr: |-
/home/akim/Desktop/venvs/deplo_test/lib/python3.10/site-packages/_testinfra_renamed.py:5: DeprecationWarning: testinfra package has been renamed to pytest-testinfra. Please `pip install pytest-testinfra` and `pip uninstall testinfra` and update your package requirements to avoid this message
warnings.warn((
Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Failed to stop firewalld.service: Unit firewalld.service not loaded.
Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Failed to disable unit: Unit file firewalld.service does not exist.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Failed to stop firewalld.service: Unit firewalld.service not loaded.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Failed to disable unit: Unit file firewalld.service does not exist.
Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
--2024-03-21 11:57:45-- https://packages-dev.wazuh.com/pre-release/apt/pool/main/w/wazuh-agent/wazuh-agent_4.7.3-1_amd64.deb
Resolving packages-dev.wazuh.com (packages-dev.wazuh.com)... 18.160.41.126, 18.160.41.28, 18.160.41.76, ...
Connecting to packages-dev.wazuh.com (packages-dev.wazuh.com)|18.160.41.126|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9362524 (8.9M) [binary/octet-stream]
Saving to: 'wazuh-agent_4.7.3-1_amd64.deb'
0K .......... .......... .......... .......... .......... 0% 819K 11s
50K .......... .......... .......... .......... .......... 1% 812K 11s
100K .......... .......... .......... .......... .......... 1% 830K 11s
150K .......... .......... .......... .......... .......... 2% 125M 8s
200K .......... .......... .......... .......... .......... 2% 120M 7s
250K .......... .......... .......... .......... .......... 3% 159M 5s
300K .......... .......... .......... .......... .......... 3% 822K 6s
350K .......... .......... .......... .......... .......... 4% 31.5M 5s
400K .......... .......... .......... .......... .......... 4% 271M 5s
450K .......... .......... .......... .......... .......... 5% 202M 4s
500K .......... .......... .......... .......... .......... 6% 226M 4s
550K .......... .......... .......... .......... .......... 6% 235M 4s
600K .......... .......... .......... .......... .......... 7% 863K 4s
650K .......... .......... .......... .......... .......... 7% 111M 4s
700K .......... .......... .......... .......... .......... 8% 90.9M 3s
750K .......... .......... .......... .......... .......... 8% 127M 3s
800K .......... .......... .......... .......... .......... 9% 230M 3s
850K .......... .......... .......... .......... .......... 9% 200M 3s
900K .......... .......... .......... .......... .......... 10% 212M 3s
950K .......... .......... .......... .......... .......... 10% 230M 3s
1000K .......... .......... .......... .......... .......... 11% 197M 2s
1050K .......... .......... .......... .......... .......... 12% 178M 2s
1100K .......... .......... .......... .......... .......... 12% 222M 2s
1150K .......... .......... .......... .......... .......... 13% 195M 2s
1200K .......... .......... .......... .......... .......... 13% 250M 2s
1250K .......... .......... .......... .......... .......... 14% 232M 2s
1300K .......... .......... .......... .......... .......... 14% 862K 2s
1350K .......... .......... .......... .......... .......... 15% 134M 2s
1400K .......... .......... .......... .......... .......... 15% 267M 2s
1450K .......... .......... .......... .......... .......... 16% 238M 2s
1500K .......... .......... .......... .......... .......... 16% 158M 2s
1550K .......... .......... .......... .......... .......... 17% 235M 2s
1600K .......... .......... .......... .......... .......... 18% 207M 2s
1650K .......... .......... .......... .......... .......... 18% 219M 2s
1700K .......... .......... .......... .......... .......... 19% 206M 2s
1750K .......... .......... .......... .......... .......... 19% 197M 2s
1800K .......... .......... .......... .......... .......... 20% 254M 1s
1850K .......... .......... .......... .......... .......... 20% 234M 1s
1900K .......... .......... .......... .......... .......... 21% 194M 1s
1950K .......... .......... .......... .......... .......... 21% 242M 1s
2000K .......... .......... .......... .......... .......... 22% 182M 1s
2050K .......... .......... .......... .......... .......... 22% 240M 1s
2100K .......... .......... .......... .......... .......... 23% 213M 1s
2150K .......... .......... .......... .......... .......... 24% 225M 1s
2200K .......... .......... .......... .......... .......... 24% 232M 1s
2250K .......... .......... .......... .......... .......... 25% 193M 1s
2300K .......... .......... .......... .......... .......... 25% 45.9M 1s
2350K .......... .......... .......... .......... .......... 26% 40.4M 1s
2400K .......... .......... .......... .......... .......... 26% 192M 1s
2450K .......... .......... .......... .......... .......... 27% 230M 1s
2500K .......... .......... .......... .......... .......... 27% 236M 1s
2550K .......... .......... .......... .......... .......... 28% 236M 1s
2600K .......... .......... .......... .......... .......... 28% 244M 1s
2650K .......... .......... .......... .......... .......... 29% 946K 1s
2700K .......... .......... .......... .......... .......... 30% 241M 1s
2750K .......... .......... .......... .......... .......... 30% 180M 1s
2800K .......... .......... .......... .......... .......... 31% 172M 1s
2850K .......... .......... .......... .......... .......... 31% 231M 1s
2900K .......... .......... .......... .......... .......... 32% 173M 1s
2950K .......... .......... .......... .......... .......... 32% 202M 1s
3000K .......... .......... .......... .......... .......... 33% 211M 1s
3050K .......... .......... .......... .......... .......... 33% 237M 1s
3100K .......... .......... .......... .......... .......... 34% 88.3M 1s
3150K .......... .......... .......... .......... .......... 34% 237M 1s
3200K .......... .......... .......... .......... .......... 35% 229M 1s
3250K .......... .......... .......... .......... .......... 36% 224M 1s
3300K .......... .......... .......... .......... .......... 36% 206M 1s
3350K .......... .......... .......... .......... .......... 37% 242M 1s
3400K .......... .......... .......... .......... .......... 37% 235M 1s
3450K .......... .......... .......... .......... .......... 38% 207M 1s
3500K .......... .......... .......... .......... .......... 38% 214M 1s
3550K .......... .......... .......... .......... .......... 39% 231M 1s
3600K .......... .......... .......... .......... .......... 39% 232M 1s
3650K .......... .......... .......... .......... .......... 40% 215M 1s
3700K .......... .......... .......... .......... .......... 41% 240M 1s
3750K .......... .......... .......... .......... .......... 41% 208M 1s
3800K .......... .......... .......... .......... .......... 42% 208M 1s
3850K .......... .......... .......... .......... .......... 42% 237M 1s
3900K .......... .......... .......... .......... .......... 43% 209M 1s
3950K .......... .......... .......... .......... .......... 43% 227M 1s
4000K .......... .......... .......... .......... .......... 44% 222M 1s
4050K .......... .......... .......... .......... .......... 44% 208M 1s
4100K .......... .......... .......... .......... .......... 45% 199M 1s
4150K .......... .......... .......... .......... .......... 45% 211M 1s
4200K .......... .......... .......... .......... .......... 46% 216M 1s
4250K .......... .......... .......... .......... .......... 47% 229M 0s
4300K .......... .......... .......... .......... .......... 47% 235M 0s
4350K .......... .......... .......... .......... .......... 48% 231M 0s
4400K .......... .......... .......... .......... .......... 48% 272M 0s
4450K .......... .......... .......... .......... .......... 49% 217M 0s
4500K .......... .......... .......... .......... .......... 49% 191M 0s
4550K .......... .......... .......... .......... .......... 50% 259M 0s
4600K .......... .......... .......... .......... .......... 50% 218M 0s
4650K .......... .......... .......... .......... .......... 51% 207M 0s
4700K .......... .......... .......... .......... .......... 51% 217M 0s
4750K .......... .......... .......... .......... .......... 52% 206M 0s
4800K .......... .......... .......... .......... .......... 53% 268M 0s
4850K .......... .......... .......... .......... .......... 53% 203M 0s
4900K .......... .......... .......... .......... .......... 54% 209M 0s
4950K .......... .......... .......... .......... .......... 54% 238M 0s
5000K .......... .......... .......... .......... .......... 55% 201M 0s
5050K .......... .......... .......... .......... .......... 55% 213M 0s
5100K .......... .......... .......... .......... .......... 56% 211M 0s
5150K .......... .......... .......... .......... .......... 56% 231M 0s
5200K .......... .......... .......... .......... .......... 57% 239M 0s
5250K .......... .......... .......... .......... .......... 57% 234M 0s
5300K .......... .......... .......... .......... .......... 58% 1014K 0s
5350K .......... .......... .......... .......... .......... 59% 218M 0s
5400K .......... .......... .......... .......... .......... 59% 57.9M 0s
5450K .......... .......... .......... .......... .......... 60% 234M 0s
5500K .......... .......... .......... .......... .......... 60% 231M 0s
5550K .......... .......... .......... .......... .......... 61% 216M 0s
5600K .......... .......... .......... .......... .......... 61% 246M 0s
5650K .......... .......... .......... .......... .......... 62% 190M 0s
5700K .......... .......... .......... .......... .......... 62% 205M 0s
5750K .......... .......... .......... .......... .......... 63% 231M 0s
5800K .......... .......... .......... .......... .......... 63% 256M 0s
5850K .......... .......... .......... .......... .......... 64% 198M 0s
5900K .......... .......... .......... .......... .......... 65% 209M 0s
5950K .......... .......... .......... .......... .......... 65% 237M 0s
6000K .......... .......... .......... .......... .......... 66% 223M 0s
6050K .......... .......... .......... .......... .......... 66% 201M 0s
6100K .......... .......... .......... .......... .......... 67% 198M 0s
6150K .......... .......... .......... .......... .......... 67% 190M 0s
6200K .......... .......... .......... .......... .......... 68% 249M 0s
6250K .......... .......... .......... .......... .......... 68% 204M 0s
6300K .......... .......... .......... .......... .......... 69% 212M 0s
6350K .......... .......... .......... .......... .......... 69% 230M 0s
6400K .......... .......... .......... .......... .......... 70% 195M 0s
6450K .......... .......... .......... .......... .......... 71% 213M 0s
6500K .......... .......... .......... .......... .......... 71% 210M 0s
6550K .......... .......... .......... .......... .......... 72% 238M 0s
6600K .......... .......... .......... .......... .......... 72% 233M 0s
6650K .......... .......... .......... .......... .......... 73% 194M 0s
6700K .......... .......... .......... .......... .......... 73% 198M 0s
6750K .......... .......... .......... .......... .......... 74% 183M 0s
6800K .......... .......... .......... .......... .......... 74% 228M 0s
6850K .......... .......... .......... .......... .......... 75% 224M 0s
6900K .......... .......... .......... .......... .......... 76% 247M 0s
6950K .......... .......... .......... .......... .......... 76% 220M 0s
7000K .......... .......... .......... .......... .......... 77% 219M 0s
7050K .......... .......... .......... .......... .......... 77% 234M 0s
7100K .......... .......... .......... .......... .......... 78% 206M 0s
7150K .......... .......... .......... .......... .......... 78% 212M 0s
7200K .......... .......... .......... .......... .......... 79% 245M 0s
7250K .......... .......... .......... .......... .......... 79% 208M 0s
7300K .......... .......... .......... .......... .......... 80% 207M 0s
7350K .......... .......... .......... .......... .......... 80% 208M 0s
7400K .......... .......... .......... .......... .......... 81% 233M 0s
7450K .......... .......... .......... .......... .......... 82% 226M 0s
7500K .......... .......... .......... .......... .......... 82% 224M 0s
7550K .......... .......... .......... .......... .......... 83% 193M 0s
7600K .......... .......... .......... .......... .......... 83% 204M 0s
7650K .......... .......... .......... .......... .......... 84% 211M 0s
7700K .......... .......... .......... .......... .......... 84% 199M 0s
7750K .......... .......... .......... .......... .......... 85% 232M 0s
7800K .......... .......... .......... .......... .......... 85% 221M 0s
7850K .......... .......... .......... .......... .......... 86% 211M 0s
7900K .......... .......... .......... .......... .......... 86% 212M 0s
7950K .......... .......... .......... .......... .......... 87% 212M 0s
8000K .......... .......... .......... .......... .......... 88% 223M 0s
8050K .......... .......... .......... .......... .......... 88% 222M 0s
8100K .......... .......... .......... .......... .......... 89% 193M 0s
8150K .......... .......... .......... .......... .......... 89% 202M 0s
8200K .......... .......... .......... .......... .......... 90% 231M 0s
8250K .......... .......... .......... .......... .......... 90% 211M 0s
8300K .......... .......... .......... .......... .......... 91% 218M 0s
8350K .......... .......... .......... .......... .......... 91% 237M 0s
8400K .......... .......... .......... .......... .......... 92% 233M 0s
8450K .......... .......... .......... .......... .......... 92% 217M 0s
8500K .......... .......... .......... .......... .......... 93% 195M 0s
8550K .......... .......... .......... .......... .......... 94% 238M 0s
8600K .......... .......... .......... .......... .......... 94% 243M 0s
8650K .......... .......... .......... .......... .......... 95% 213M 0s
8700K .......... .......... .......... .......... .......... 95% 236M 0s
8750K .......... .......... .......... .......... .......... 96% 212M 0s
8800K .......... .......... .......... .......... .......... 96% 250M 0s
8850K .......... .......... .......... .......... .......... 97% 234M 0s
8900K .......... .......... .......... .......... .......... 97% 177M 0s
8950K .......... .......... .......... .......... .......... 98% 247M 0s
9000K .......... .......... .......... .......... .......... 98% 263M 0s
9050K .......... .......... .......... .......... .......... 99% 210M 0s
9100K .......... .......... .......... .......... ... 100% 241M=0.5s
2024-03-21 11:57:46 (17.6 MB/s) - 'wazuh-agent_4.7.3-1_amd64.deb' saved [9362524/9362524]
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Created symlink /etc/systemd/system/multi-user.target.wants/wazuh-agent.service → /lib/systemd/system/wazuh-agent.service.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Job for wazuh-agent.service failed because the control process exited with error code.
See "systemctl status wazuh-agent.service" and "journalctl -xe" for details.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
stderr_lines: <omitted>
stdout: |-
============================= test session starts ==============================
platform linux -- Python 3.10.12, pytest-8.1.0, pluggy-1.4.0 -- /home/akim/Desktop/venvs/deplo_test/bin/python3
cachedir: .pytest_cache
rootdir: /home/akim/Desktop/wazuh-qa/deployability/modules
plugins: testinfra-6.0.0, testinfra-10.1.0
collecting ... collected 4 items
modules/testing/tests/test_agent/test_install.py::test_installation PASSED
modules/testing/tests/test_agent/test_install.py::test_status PASSED
modules/testing/tests/test_agent/test_install.py::test_version PASSED
modules/testing/tests/test_agent/test_install.py::test_revision PASSED
=============================== warnings summary ===============================
modules/provision/models.py:65
/home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:65: 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', pre=True)
modules/provision/models.py:73
/home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:73: 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('uninstall', pre=True)
modules/testing/tests/helpers/agent.py:57
/home/akim/Desktop/wazuh-qa/deployability/modules/testing/tests/helpers/agent.py:57: DeprecationWarning: invalid escape sequence '\w'
"-OutFile ${env.tmp}\wazuh-agent;"
modules/testing/tests/helpers/agent.py:58
/home/akim/Desktop/wazuh-qa/deployability/modules/testing/tests/helpers/agent.py:58: DeprecationWarning: invalid escape sequence '\w'
"msiexec.exe /i ${env.tmp}\wazuh-agent /q"
modules/testing/tests/helpers/agent.py:99
modules/testing/tests/helpers/agent.py:99
/home/akim/Desktop/wazuh-qa/deployability/modules/testing/tests/helpers/agent.py:99: DeprecationWarning: invalid escape sequence '\/'
f"sed -i 's/<address>MANAGER_IP<\/address>/<address>{internal_ip}<\/address>/g' {WAZUH_CONF}",
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================== 4 passed, 6 warnings in 155.64s (0:02:35) ===================
stdout_lines: <omitted>
PLAY RECAP *********************************************************************
localhost : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
[2024-03-21 12:58:15] [DEBUG] ANSIBLE: 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='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --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-03-21 12:58:15] [DEBUG] ANSIBLE: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/test.yml
[2024-03-21 12:58:15] [DEBUG] ANSIBLE: Using inventory: {'all': {'hosts': {'ec2-54-162-7-172.compute-1.amazonaws.com': {'ansible_port': 2200, 'ansible_user': 'ubuntu', 'ansible_ssh_private_key_file': '/home/akim/Desktop/personal/Ephemeral'}}}}
[2024-03-21 12:58:15] [DEBUG] ANSIBLE: 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='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --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={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}'
- '--targets={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}'
- --live=True
- -s
delta: '0:00:39.202172'
end: '2024-03-21 12:59:00.255563'
msg: ''
rc: 0
start: '2024-03-21 12:58:21.053391'
stderr: |-
/home/akim/Desktop/venvs/deplo_test/lib/python3.10/site-packages/_testinfra_renamed.py:5: DeprecationWarning: testinfra package has been renamed to pytest-testinfra. Please `pip install pytest-testinfra` and `pip uninstall testinfra` and update your package requirements to avoid this message
warnings.warn((
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
stderr_lines: <omitted>
stdout: |-
============================= test session starts ==============================
platform linux -- Python 3.10.12, pytest-8.1.0, pluggy-1.4.0 -- /home/akim/Desktop/venvs/deplo_test/bin/python3
cachedir: .pytest_cache
rootdir: /home/akim/Desktop/wazuh-qa/deployability/modules
plugins: testinfra-6.0.0, testinfra-10.1.0
collecting ... collected 5 items
modules/testing/tests/test_agent/test_registration.py::test_registration PASSED
modules/testing/tests/test_agent/test_registration.py::test_status PASSED
modules/testing/tests/test_agent/test_registration.py::test_connection PASSED
modules/testing/tests/test_agent/test_registration.py::test_isActive PASSED
modules/testing/tests/test_agent/test_registration.py::test_clientKeys PASSED
=============================== warnings summary ===============================
modules/provision/models.py:65
/home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:65: 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', pre=True)
modules/provision/models.py:73
/home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:73: 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('uninstall', pre=True)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================== 5 passed, 2 warnings in 38.55s ========================
stdout_lines: <omitted>
PLAY RECAP *********************************************************************
localhost : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
[2024-03-21 12:59:00] [DEBUG] ANSIBLE: 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='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --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-03-21 12:59:00] [DEBUG] ANSIBLE: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/test.yml
[2024-03-21 12:59:00] [DEBUG] ANSIBLE: Using inventory: {'all': {'hosts': {'ec2-54-162-7-172.compute-1.amazonaws.com': {'ansible_port': 2200, 'ansible_user': 'ubuntu', 'ansible_ssh_private_key_file': '/home/akim/Desktop/personal/Ephemeral'}}}}
[2024-03-21 12:59:00] [DEBUG] ANSIBLE: 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='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --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={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}'
- '--targets={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}'
- --live=True
- -s
delta: '0:00:25.825662'
end: '2024-03-21 12:59:31.850510'
msg: ''
rc: 0
start: '2024-03-21 12:59:06.024848'
stderr: |-
/home/akim/Desktop/venvs/deplo_test/lib/python3.10/site-packages/_testinfra_renamed.py:5: DeprecationWarning: testinfra package has been renamed to pytest-testinfra. Please `pip install pytest-testinfra` and `pip uninstall testinfra` and update your package requirements to avoid this message
warnings.warn((
Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
stderr_lines: <omitted>
stdout: |-
============================= test session starts ==============================
platform linux -- Python 3.10.12, pytest-8.1.0, pluggy-1.4.0 -- /home/akim/Desktop/venvs/deplo_test/bin/python3
cachedir: .pytest_cache
rootdir: /home/akim/Desktop/wazuh-qa/deployability/modules
plugins: testinfra-6.0.0, testinfra-10.1.0
collecting ... collected 1 item
modules/testing/tests/test_agent/test_stop.py::test_stop PASSED
=============================== warnings summary ===============================
modules/provision/models.py:65
/home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:65: 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', pre=True)
modules/provision/models.py:73
/home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:73: 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('uninstall', pre=True)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================== 1 passed, 2 warnings in 25.26s ========================
stdout_lines: <omitted>
PLAY RECAP *********************************************************************
localhost : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
[2024-03-21 12:59:32] [DEBUG] ANSIBLE: 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='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --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-03-21 12:59:32] [DEBUG] ANSIBLE: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/test.yml
[2024-03-21 12:59:32] [DEBUG] ANSIBLE: Using inventory: {'all': {'hosts': {'ec2-54-162-7-172.compute-1.amazonaws.com': {'ansible_port': 2200, 'ansible_user': 'ubuntu', 'ansible_ssh_private_key_file': '/home/akim/Desktop/personal/Ephemeral'}}}}
[2024-03-21 12:59:32] [DEBUG] ANSIBLE: 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='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --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={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}'
- '--targets={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}'
- --live=True
- -s
delta: '0:00:19.139802'
end: '2024-03-21 12:59:56.825163'
msg: ''
rc: 0
start: '2024-03-21 12:59:37.685361'
stderr: |-
/home/akim/Desktop/venvs/deplo_test/lib/python3.10/site-packages/_testinfra_renamed.py:5: DeprecationWarning: testinfra package has been renamed to pytest-testinfra. Please `pip install pytest-testinfra` and `pip uninstall testinfra` and update your package requirements to avoid this message
warnings.warn((
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
stderr_lines: <omitted>
stdout: |-
============================= test session starts ==============================
platform linux -- Python 3.10.12, pytest-8.1.0, pluggy-1.4.0 -- /home/akim/Desktop/venvs/deplo_test/bin/python3
cachedir: .pytest_cache
rootdir: /home/akim/Desktop/wazuh-qa/deployability/modules
plugins: testinfra-6.0.0, testinfra-10.1.0
collecting ... collected 5 items
modules/testing/tests/test_agent/test_restart.py::test_restart PASSED
modules/testing/tests/test_agent/test_restart.py::test_status 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
=============================== warnings summary ===============================
modules/provision/models.py:65
/home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:65: 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', pre=True)
modules/provision/models.py:73
/home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:73: 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('uninstall', pre=True)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================== 5 passed, 2 warnings in 18.56s ========================
stdout_lines: <omitted>
PLAY RECAP *********************************************************************
localhost : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
[2024-03-21 12:59:57] [DEBUG] ANSIBLE: 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='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --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-03-21 12:59:57] [DEBUG] ANSIBLE: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/test.yml
[2024-03-21 12:59:57] [DEBUG] ANSIBLE: Using inventory: {'all': {'hosts': {'ec2-54-162-7-172.compute-1.amazonaws.com': {'ansible_port': 2200, 'ansible_user': 'ubuntu', 'ansible_ssh_private_key_file': '/home/akim/Desktop/personal/Ephemeral'}}}}
[2024-03-21 12:59:57] [DEBUG] ANSIBLE: 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='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --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={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}'
- '--targets={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}'
- --live=True
- -s
delta: '0:00:53.683342'
end: '2024-03-21 13:00:56.404533'
msg: ''
rc: 0
start: '2024-03-21 13:00:02.721191'
stderr: |-
/home/akim/Desktop/venvs/deplo_test/lib/python3.10/site-packages/_testinfra_renamed.py:5: DeprecationWarning: testinfra package has been renamed to pytest-testinfra. Please `pip install pytest-testinfra` and `pip uninstall testinfra` and update your package requirements to avoid this message
warnings.warn((
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_TIME = "es_ES.UTF-8",
LC_MONETARY = "es_ES.UTF-8",
LC_ADDRESS = "es_ES.UTF-8",
LC_TELEPHONE = "es_ES.UTF-8",
LC_NAME = "es_ES.UTF-8",
LC_MEASUREMENT = "es_ES.UTF-8",
LC_IDENTIFICATION = "es_ES.UTF-8",
LC_NUMERIC = "es_ES.UTF-8",
LC_PAPER = "es_ES.UTF-8",
LANG = "C.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("C.UTF-8").
locale: Cannot set LC_ALL to default locale: No such file or directory
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Removed /etc/systemd/system/multi-user.target.wants/wazuh-agent.service.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-162-7-172.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
Warning: Permanently added '[ec2-54-144-42-190.compute-1.amazonaws.com]:2200' (ED25519) to the list of known hosts.
stderr_lines: <omitted>
stdout: |-
============================= test session starts ==============================
platform linux -- Python 3.10.12, pytest-8.1.0, pluggy-1.4.0 -- /home/akim/Desktop/venvs/deplo_test/bin/python3
cachedir: .pytest_cache
rootdir: /home/akim/Desktop/wazuh-qa/deployability/modules
plugins: testinfra-6.0.0, testinfra-10.1.0
collecting ... collected 3 items
modules/testing/tests/test_agent/test_uninstall.py::test_uninstall PASSED
modules/testing/tests/test_agent/test_uninstall.py::test_agent_uninstalled_directory PASSED
modules/testing/tests/test_agent/test_uninstall.py::test_isActive PASSED
=============================== warnings summary ===============================
modules/provision/models.py:65
/home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:65: 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', pre=True)
modules/provision/models.py:73
/home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:73: 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('uninstall', pre=True)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================== 3 passed, 2 warnings in 53.11s ========================
stdout_lines: <omitted>
PLAY RECAP *********************************************************************
localhost : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
[2024-03-21 13:00:56] [DEBUG] ANSIBLE: 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='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --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-03-21 13:00:56] [DEBUG] ANSIBLE: Using inventory: {'all': {'hosts': {'ec2-54-162-7-172.compute-1.amazonaws.com': {'ansible_port': 2200, 'ansible_user': 'ubuntu', 'ansible_ssh_private_key_file': '/home/akim/Desktop/personal/Ephemeral'}}}}
[2024-03-21 13:00:56] [DEBUG] ANSIBLE: 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-54-162-7-172.compute-1.amazonaws.com]
TASK [Clean test directory] ****************************************************
ok: [ec2-54-162-7-172.compute-1.amazonaws.com] => changed=false
path: /tmp/tests
state: absent
PLAY RECAP *********************************************************************
ec2-54-162-7-172.compute-1.amazonaws.com : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
[2024-03-21 13:01:09] [DEBUG] ANSIBLE: Playbook /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/cleanup.yml finished with status {'skipped': {}, 'ok': {'ec2-54-162-7-172.compute-1.amazonaws.com': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'ec2-54-162-7-172.compute-1.amazonaws.com': 1}, 'changed': {}}
[2024-03-21 13:01:09] [DEBUG] ANSIBLE: Using inventory: {'all': {'hosts': {'ec2-54-162-7-172.compute-1.amazonaws.com': {'ansible_port': 2200, 'ansible_user': 'ubuntu', 'ansible_ssh_private_key_file': '/home/akim/Desktop/personal/Ephemeral'}}}}
[2024-03-21 13:01:09] [DEBUG] ANSIBLE: 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-54-162-7-172.compute-1.amazonaws.com]
TASK [Clean test directory] ****************************************************
ok: [ec2-54-162-7-172.compute-1.amazonaws.com] => changed=false
path: /tmp/tests
state: absent
PLAY RECAP *********************************************************************
ec2-54-162-7-172.compute-1.amazonaws.com : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
[2024-03-21 13:01:19] [DEBUG] ANSIBLE: Playbook /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/cleanup.yml finished with status {'skipped': {}, 'ok': {'ec2-54-162-7-172.compute-1.amazonaws.com': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'ec2-54-162-7-172.compute-1.amazonaws.com': 1}, 'changed': {}}
Result Vagrant post changes 🟢(deplo_test) akim@akim-PC:~/Desktop/wazuh-qa/deployability$ python3 modules/testing/main.py --wazuh-revision '40714' --wazuh-version '4.7.3' --component 'agent' --tests 'install,registration,stop,restart,uninstall' --targets '{"wazuh-1":"/tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml"}' --targets '{"agent-1":"/tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml"}' --dependencies '{"wazuh-1":"/tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml"}' --live 'True'
component='agent' wazuh_version='4.7.3' wazuh_revision='40714' wazuh_branch=None working_dir='/tmp/tests' live=True tests=['install', 'registration', 'stop', 'restart', 'uninstall'] targets=['{"wazuh-1":"/tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml"}', '{"agent-1":"/tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml"}'] dependencies=['{"wazuh-1":"/tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml"}'] cleanup=True
[2024-03-21 13:05:45] [INFO] TESTER: Running tests for 192.168.57.4
[2024-03-21 13:05:45] [INFO] TESTER: Running tests for 192.168.57.3
[2024-03-21 13:05:45] [INFO] TESTER: Dependencies 192.168.57.4
[2024-03-21 13:05:45] [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': ['192.168.57.4', '192.168.57.3'], 'targets': '{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}', 'dependencies': '{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}', 'local_host_path': '/home/akim/Desktop/wazuh-qa/deployability', 'current_user': 'akim'}
[2024-03-21 13:05:45] [DEBUG] ANSIBLE: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/setup.yml
[2024-03-21 13:05:45] [DEBUG] ANSIBLE: Using inventory: {'all': {'hosts': {'192.168.57.4': {'ansible_port': 22, 'ansible_user': 'vagrant', 'ansible_ssh_private_key_file': '/tmp/wazuh-qa/VAGRANT-62300D3C-6FC0-4235-B915-ED792442BAB0/instance_key'}}}}
[2024-03-21 13:05:45] [DEBUG] ANSIBLE: 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': ['192.168.57.4', '192.168.57.3']}]}]
No config file found; using defaults
PLAY [localhost] ***************************************************************
TASK [Gathering Facts] *********************************************************
ok: [localhost]
TASK [Cleaning old key ssh-keygen registries] **********************************
changed: [localhost] => (item=192.168.57.4) => changed=true
ansible_loop_var: item
cmd:
- ssh-keygen
- -f
- /home/akim/.ssh/known_hosts
- -R
- ''
delta: '0:00:00.009034'
end: '2024-03-21 13:05:51.484108'
item: 192.168.57.4
msg: ''
rc: 0
start: '2024-03-21 13:05:51.475074'
stderr: Host not found in /home/akim/.ssh/known_hosts
stderr_lines: <omitted>
stdout: ''
stdout_lines: <omitted>
changed: [localhost] => (item=192.168.57.3) => changed=true
ansible_loop_var: item
cmd:
- ssh-keygen
- -f
- /home/akim/.ssh/known_hosts
- -R
- ''
delta: '0:00:00.009338'
end: '2024-03-21 13:05:51.651691'
item: 192.168.57.3
msg: ''
rc: 0
start: '2024-03-21 13:05:51.642353'
stderr: Host not found in /home/akim/.ssh/known_hosts
stderr_lines: <omitted>
stdout: ''
stdout_lines: <omitted>
PLAY RECAP *********************************************************************
localhost : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
[2024-03-21 13:05:51] [DEBUG] ANSIBLE: 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': ['192.168.57.4', '192.168.57.3']}]}] finished with status {'skipped': {}, 'ok': {'localhost': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'localhost': 1}, 'changed': {'localhost': 1}}
[2024-03-21 13:05:51] [DEBUG] ANSIBLE: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/test.yml
[2024-03-21 13:05:51] [DEBUG] ANSIBLE: Using inventory: {'all': {'hosts': {'192.168.57.4': {'ansible_port': 22, 'ansible_user': 'vagrant', 'ansible_ssh_private_key_file': '/tmp/wazuh-qa/VAGRANT-62300D3C-6FC0-4235-B915-ED792442BAB0/instance_key'}}}}
[2024-03-21 13:05:51] [DEBUG] ANSIBLE: 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='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --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={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}'
- '--targets={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}'
- --live=True
- -s
delta: '0:03:28.983975'
end: '2024-03-21 13:09:23.685112'
msg: ''
rc: 0
start: '2024-03-21 13:05:54.701137'
stderr: |-
/home/akim/Desktop/venvs/deplo_test/lib/python3.10/site-packages/_testinfra_renamed.py:5: DeprecationWarning: testinfra package has been renamed to pytest-testinfra. Please `pip install pytest-testinfra` and `pip uninstall testinfra` and update your package requirements to avoid this message
warnings.warn((
Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
Failed to stop firewalld.service: Unit firewalld.service not loaded.
Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
Failed to disable unit: Unit file firewalld.service does not exist.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Failed to stop firewalld.service: Unit firewalld.service not loaded.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Failed to disable unit: Unit file firewalld.service does not exist.
Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
--2024-03-21 12:09:07-- https://packages-dev.wazuh.com/pre-release/apt/pool/main/w/wazuh-agent/wazuh-agent_4.7.3-1_amd64.deb
Resolving packages-dev.wazuh.com (packages-dev.wazuh.com)... 52.84.66.65, 52.84.66.16, 52.84.66.126, ...
Connecting to packages-dev.wazuh.com (packages-dev.wazuh.com)|52.84.66.65|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9362524 (8.9M) [binary/octet-stream]
Saving to: 'wazuh-agent_4.7.3-1_amd64.deb'
0K .......... .......... .......... .......... .......... 0% 293K 31s
50K .......... .......... .......... .......... .......... 1% 127K 51s
100K .......... .......... .......... .......... .......... 1% 36.9M 34s
150K .......... .......... .......... .......... .......... 2% 1.87M 27s
200K .......... .......... .......... .......... .......... 2% 3.00M 22s
250K .......... .......... .......... .......... .......... 3% 4.81M 18s
300K .......... .......... .......... .......... .......... 3% 2.47M 16s
350K .......... .......... .......... .......... .......... 4% 3.75M 14s
400K .......... .......... .......... .......... .......... 4% 1.42M 13s
450K .......... .......... .......... .......... .......... 5% 3.29M 12s
500K .......... .......... .......... .......... .......... 6% 22.0M 11s
550K .......... .......... .......... .......... .......... 6% 2.85M 10s
600K .......... .......... .......... .......... .......... 7% 1.04M 10s
650K .......... .......... .......... .......... .......... 7% 1.14M 10s
700K .......... .......... .......... .......... .......... 8% 4.43M 9s
750K .......... .......... .......... .......... .......... 8% 17.0M 9s
800K .......... .......... .......... .......... .......... 9% 1.61M 8s
850K .......... .......... .......... .......... .......... 9% 3.41M 8s
900K .......... .......... .......... .......... .......... 10% 60.0M 8s
950K .......... .......... .......... .......... .......... 10% 2.20M 7s
1000K .......... .......... .......... .......... .......... 11% 2.23M 7s
1050K .......... .......... .......... .......... .......... 12% 6.33M 7s
1100K .......... .......... .......... .......... .......... 12% 4.07M 6s
1150K .......... .......... .......... .......... .......... 13% 3.19M 6s
1200K .......... .......... .......... .......... .......... 13% 4.19M 6s
1250K .......... .......... .......... .......... .......... 14% 5.61M 6s
1300K .......... .......... .......... .......... .......... 14% 2.76M 6s
1350K .......... .......... .......... .......... .......... 15% 3.12M 6s
1400K .......... .......... .......... .......... .......... 15% 6.89M 5s
1450K .......... .......... .......... .......... .......... 16% 3.89M 5s
1500K .......... .......... .......... .......... .......... 16% 3.12M 5s
1550K .......... .......... .......... .......... .......... 17% 4.37M 5s
1600K .......... .......... .......... .......... .......... 18% 2.78M 5s
1650K .......... .......... .......... .......... .......... 18% 8.66M 5s
1700K .......... .......... .......... .......... .......... 19% 2.46M 5s
1750K .......... .......... .......... .......... .......... 19% 113M 4s
1800K .......... .......... .......... .......... .......... 20% 2.39M 4s
1850K .......... .......... .......... .......... .......... 20% 17.9M 4s
1900K .......... .......... .......... .......... .......... 21% 2.22M 4s
1950K .......... .......... .......... .......... .......... 21% 13.9M 4s
2000K .......... .......... .......... .......... .......... 22% 2.06M 4s
2050K .......... .......... .......... .......... .......... 22% 9.00M 4s
2100K .......... .......... .......... .......... .......... 23% 1.70M 4s
2150K .......... .......... .......... .......... .......... 24% 8.34M 4s
2200K .......... .......... .......... .......... .......... 24% 4.10M 4s
2250K .......... .......... .......... .......... .......... 25% 45.8M 4s
2300K .......... .......... .......... .......... .......... 25% 2.98M 4s
2350K .......... .......... .......... .......... .......... 26% 3.38M 4s
2400K .......... .......... .......... .......... .......... 26% 7.20M 3s
2450K .......... .......... .......... .......... .......... 27% 2.54M 3s
2500K .......... .......... .......... .......... .......... 27% 8.38M 3s
2550K .......... .......... .......... .......... .......... 28% 5.87M 3s
2600K .......... .......... .......... .......... .......... 28% 2.14M 3s
2650K .......... .......... .......... .......... .......... 29% 12.3M 3s
2700K .......... .......... .......... .......... .......... 30% 24.4M 3s
2750K .......... .......... .......... .......... .......... 30% 2.94M 3s
2800K .......... .......... .......... .......... .......... 31% 12.8M 3s
2850K .......... .......... .......... .......... .......... 31% 5.06M 3s
2900K .......... .......... .......... .......... .......... 32% 2.42M 3s
2950K .......... .......... .......... .......... .......... 32% 13.1M 3s
3000K .......... .......... .......... .......... .......... 33% 3.27M 3s
3050K .......... .......... .......... .......... .......... 33% 3.71M 3s
3100K .......... .......... .......... .......... .......... 34% 15.2M 3s
3150K .......... .......... .......... .......... .......... 34% 4.29M 3s
3200K .......... .......... .......... .......... .......... 35% 9.36M 3s
3250K .......... .......... .......... .......... .......... 36% 3.20M 3s
3300K .......... .......... .......... .......... .......... 36% 15.3M 2s
3350K .......... .......... .......... .......... .......... 37% 2.41M 2s
3400K .......... .......... .......... .......... .......... 37% 15.4M 2s
3450K .......... .......... .......... .......... .......... 38% 3.38M 2s
3500K .......... .......... .......... .......... .......... 38% 29.8M 2s
3550K .......... .......... .......... .......... .......... 39% 10.7M 2s
3600K .......... .......... .......... .......... .......... 39% 2.44M 2s
3650K .......... .......... .......... .......... .......... 40% 29.3M 2s
3700K .......... .......... .......... .......... .......... 41% 3.30M 2s
3750K .......... .......... .......... .......... .......... 41% 3.92M 2s
3800K .......... .......... .......... .......... .......... 42% 11.2M 2s
3850K .......... .......... .......... .......... .......... 42% 13.7M 2s
3900K .......... .......... .......... .......... .......... 43% 19.1M 2s
3950K .......... .......... .......... .......... .......... 43% 4.71M 2s
4000K .......... .......... .......... .......... .......... 44% 2.80M 2s
4050K .......... .......... .......... .......... .......... 44% 1.36M 2s
4100K .......... .......... .......... .......... .......... 45% 59.3M 2s
4150K .......... .......... .......... .......... .......... 45% 3.47M 2s
4200K .......... .......... .......... .......... .......... 46% 16.5M 2s
4250K .......... .......... .......... .......... .......... 47% 47.9M 2s
4300K .......... .......... .......... .......... .......... 47% 4.96M 2s
4350K .......... .......... .......... .......... .......... 48% 49.7M 2s
4400K .......... .......... .......... .......... .......... 48% 4.45M 2s
4450K .......... .......... .......... .......... .......... 49% 52.2M 2s
4500K .......... .......... .......... .......... .......... 49% 4.53M 2s
4550K .......... .......... .......... .......... .......... 50% 10.4M 2s
4600K .......... .......... .......... .......... .......... 50% 5.20M 2s
4650K .......... .......... .......... .......... .......... 51% 9.25M 2s
4700K .......... .......... .......... .......... .......... 51% 15.2M 2s
4750K .......... .......... .......... .......... .......... 52% 20.6M 2s
4800K .......... .......... .......... .......... .......... 53% 5.30M 1s
4850K .......... .......... .......... .......... .......... 53% 3.42M 1s
4900K .......... .......... .......... .......... .......... 54% 8.37M 1s
4950K .......... .......... .......... .......... .......... 54% 5.50M 1s
5000K .......... .......... .......... .......... .......... 55% 29.6M 1s
5050K .......... .......... .......... .......... .......... 55% 6.88M 1s
5100K .......... .......... .......... .......... .......... 56% 6.10M 1s
5150K .......... .......... .......... .......... .......... 56% 2.54M 1s
5200K .......... .......... .......... .......... .......... 57% 22.9M 1s
5250K .......... .......... .......... .......... .......... 57% 4.34M 1s
5300K .......... .......... .......... .......... .......... 58% 25.2M 1s
5350K .......... .......... .......... .......... .......... 59% 11.3M 1s
5400K .......... .......... .......... .......... .......... 59% 9.64M 1s
5450K .......... .......... .......... .......... .......... 60% 4.76M 1s
5500K .......... .......... .......... .......... .......... 60% 3.62M 1s
5550K .......... .......... .......... .......... .......... 61% 1.94M 1s
5600K .......... .......... .......... .......... .......... 61% 118M 1s
5650K .......... .......... .......... .......... .......... 62% 245M 1s
5700K .......... .......... .......... .......... .......... 62% 5.28M 1s
5750K .......... .......... .......... .......... .......... 63% 9.54M 1s
5800K .......... .......... .......... .......... .......... 63% 4.48M 1s
5850K .......... .......... .......... .......... .......... 64% 4.36M 1s
5900K .......... .......... .......... .......... .......... 65% 90.2M 1s
5950K .......... .......... .......... .......... .......... 65% 25.0M 1s
6000K .......... .......... .......... .......... .......... 66% 6.70M 1s
6050K .......... .......... .......... .......... .......... 66% 5.09M 1s
6100K .......... .......... .......... .......... .......... 67% 5.74M 1s
6150K .......... .......... .......... .......... .......... 67% 18.0M 1s
6200K .......... .......... .......... .......... .......... 68% 2.96M 1s
6250K .......... .......... .......... .......... .......... 68% 5.93M 1s
6300K .......... .......... .......... .......... .......... 69% 8.73M 1s
6350K .......... .......... .......... .......... .......... 69% 4.05M 1s
6400K .......... .......... .......... .......... .......... 70% 23.5M 1s
6450K .......... .......... .......... .......... .......... 71% 2.68M 1s
6500K .......... .......... .......... .......... .......... 71% 2.16M 1s
6550K .......... .......... .......... .......... .......... 72% 12.3M 1s
6600K .......... .......... .......... .......... .......... 72% 24.0M 1s
6650K .......... .......... .......... .......... .......... 73% 29.4M 1s
6700K .......... .......... .......... .......... .......... 73% 22.0M 1s
6750K .......... .......... .......... .......... .......... 74% 10.4M 1s
6800K .......... .......... .......... .......... .......... 74% 33.2M 1s
6850K .......... .......... .......... .......... .......... 75% 26.3M 1s
6900K .......... .......... .......... .......... .......... 76% 2.84M 1s
6950K .......... .......... .......... .......... .......... 76% 20.1M 1s
7000K .......... .......... .......... .......... .......... 77% 14.1M 1s
7050K .......... .......... .......... .......... .......... 77% 5.47M 1s
7100K .......... .......... .......... .......... .......... 78% 24.9M 1s
7150K .......... .......... .......... .......... .......... 78% 13.4M 1s
7200K .......... .......... .......... .......... .......... 79% 20.8M 1s
7250K .......... .......... .......... .......... .......... 79% 8.71M 1s
7300K .......... .......... .......... .......... .......... 80% 6.86M 1s
7350K .......... .......... .......... .......... .......... 80% 4.18M 0s
7400K .......... .......... .......... .......... .......... 81% 8.50M 0s
7450K .......... .......... .......... .......... .......... 82% 1.63M 0s
7500K .......... .......... .......... .......... .......... 82% 6.61M 0s
7550K .......... .......... .......... .......... .......... 83% 1.71M 0s
7600K .......... .......... .......... .......... .......... 83% 26.5M 0s
7650K .......... .......... .......... .......... .......... 84% 13.9M 0s
7700K .......... .......... .......... .......... .......... 84% 7.00M 0s
7750K .......... .......... .......... .......... .......... 85% 7.90M 0s
7800K .......... .......... .......... .......... .......... 85% 1.78M 0s
7850K .......... .......... .......... .......... .......... 86% 3.05M 0s
7900K .......... .......... .......... .......... .......... 86% 21.1M 0s
7950K .......... .......... .......... .......... .......... 87% 22.9M 0s
8000K .......... .......... .......... .......... .......... 88% 3.78M 0s
8050K .......... .......... .......... .......... .......... 88% 11.4M 0s
8100K .......... .......... .......... .......... .......... 89% 5.44M 0s
8150K .......... .......... .......... .......... .......... 89% 5.52M 0s
8200K .......... .......... .......... .......... .......... 90% 4.06M 0s
8250K .......... .......... .......... .......... .......... 90% 4.98M 0s
8300K .......... .......... .......... .......... .......... 91% 27.0M 0s
8350K .......... .......... .......... .......... .......... 91% 6.65M 0s
8400K .......... .......... .......... .......... .......... 92% 15.4M 0s
8450K .......... .......... .......... .......... .......... 92% 21.7M 0s
8500K .......... .......... .......... .......... .......... 93% 13.0M 0s
8550K .......... .......... .......... .......... .......... 94% 5.57M 0s
8600K .......... .......... .......... .......... .......... 94% 3.10M 0s
8650K .......... .......... .......... .......... .......... 95% 6.72M 0s
8700K .......... .......... .......... .......... .......... 95% 17.5M 0s
8750K .......... .......... .......... .......... .......... 96% 4.34M 0s
8800K .......... .......... .......... .......... .......... 96% 11.6M 0s
8850K .......... .......... .......... .......... .......... 97% 30.3M 0s
8900K .......... .......... .......... .......... .......... 97% 8.27M 0s
8950K .......... .......... .......... .......... .......... 98% 12.1M 0s
9000K .......... .......... .......... .......... .......... 98% 4.16M 0s
9050K .......... .......... .......... .......... .......... 99% 18.7M 0s
9100K .......... .......... .......... .......... ... 100% 23.5M=2.4s
2024-03-21 12:09:10 (3.79 MB/s) - 'wazuh-agent_4.7.3-1_amd64.deb' saved [9362524/9362524]
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Created symlink /etc/systemd/system/multi-user.target.wants/wazuh-agent.service → /lib/systemd/system/wazuh-agent.service.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Job for wazuh-agent.service failed because the control process exited with error code.
See "systemctl status wazuh-agent.service" and "journalctl -xe" for details.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
stderr_lines: <omitted>
stdout: |-
============================= test session starts ==============================
platform linux -- Python 3.10.12, pytest-8.1.0, pluggy-1.4.0 -- /home/akim/Desktop/venvs/deplo_test/bin/python3
cachedir: .pytest_cache
rootdir: /home/akim/Desktop/wazuh-qa/deployability/modules
plugins: testinfra-6.0.0, testinfra-10.1.0
collecting ... collected 4 items
modules/testing/tests/test_agent/test_install.py::test_installation PASSED
modules/testing/tests/test_agent/test_install.py::test_status PASSED
modules/testing/tests/test_agent/test_install.py::test_version PASSED
modules/testing/tests/test_agent/test_install.py::test_revision PASSED
=============================== warnings summary ===============================
modules/provision/models.py:65
/home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:65: 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', pre=True)
modules/provision/models.py:73
/home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:73: 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('uninstall', pre=True)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================== 4 passed, 2 warnings in 208.41s (0:03:28) ===================
stdout_lines: <omitted>
PLAY RECAP *********************************************************************
localhost : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
[2024-03-21 13:09:23] [DEBUG] ANSIBLE: 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='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --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-03-21 13:09:24] [DEBUG] ANSIBLE: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/test.yml
[2024-03-21 13:09:24] [DEBUG] ANSIBLE: Using inventory: {'all': {'hosts': {'192.168.57.4': {'ansible_port': 22, 'ansible_user': 'vagrant', 'ansible_ssh_private_key_file': '/tmp/wazuh-qa/VAGRANT-62300D3C-6FC0-4235-B915-ED792442BAB0/instance_key'}}}}
[2024-03-21 13:09:24] [DEBUG] ANSIBLE: 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='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --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={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}'
- '--targets={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}'
- --live=True
- -s
delta: '0:00:33.676485'
end: '2024-03-21 13:10:03.431430'
msg: ''
rc: 0
start: '2024-03-21 13:09:29.754945'
stderr: |-
/home/akim/Desktop/venvs/deplo_test/lib/python3.10/site-packages/_testinfra_renamed.py:5: DeprecationWarning: testinfra package has been renamed to pytest-testinfra. Please `pip install pytest-testinfra` and `pip uninstall testinfra` and update your package requirements to avoid this message
warnings.warn((
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
stderr_lines: <omitted>
stdout: |-
============================= test session starts ==============================
platform linux -- Python 3.10.12, pytest-8.1.0, pluggy-1.4.0 -- /home/akim/Desktop/venvs/deplo_test/bin/python3
cachedir: .pytest_cache
rootdir: /home/akim/Desktop/wazuh-qa/deployability/modules
plugins: testinfra-6.0.0, testinfra-10.1.0
collecting ... collected 5 items
modules/testing/tests/test_agent/test_registration.py::test_registration PASSED
modules/testing/tests/test_agent/test_registration.py::test_status PASSED
modules/testing/tests/test_agent/test_registration.py::test_connection PASSED
modules/testing/tests/test_agent/test_registration.py::test_isActive PASSED
modules/testing/tests/test_agent/test_registration.py::test_clientKeys PASSED
=============================== warnings summary ===============================
modules/provision/models.py:65
/home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:65: 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', pre=True)
modules/provision/models.py:73
/home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:73: 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('uninstall', pre=True)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================== 5 passed, 2 warnings in 33.07s ========================
stdout_lines: <omitted>
PLAY RECAP *********************************************************************
localhost : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
[2024-03-21 13:10:03] [DEBUG] ANSIBLE: 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='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --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-03-21 13:10:03] [DEBUG] ANSIBLE: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/test.yml
[2024-03-21 13:10:03] [DEBUG] ANSIBLE: Using inventory: {'all': {'hosts': {'192.168.57.4': {'ansible_port': 22, 'ansible_user': 'vagrant', 'ansible_ssh_private_key_file': '/tmp/wazuh-qa/VAGRANT-62300D3C-6FC0-4235-B915-ED792442BAB0/instance_key'}}}}
[2024-03-21 13:10:03] [DEBUG] ANSIBLE: 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='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --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={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}'
- '--targets={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}'
- --live=True
- -s
delta: '0:00:12.902437'
end: '2024-03-21 13:10:22.396558'
msg: ''
rc: 0
start: '2024-03-21 13:10:09.494121'
stderr: |-
/home/akim/Desktop/venvs/deplo_test/lib/python3.10/site-packages/_testinfra_renamed.py:5: DeprecationWarning: testinfra package has been renamed to pytest-testinfra. Please `pip install pytest-testinfra` and `pip uninstall testinfra` and update your package requirements to avoid this message
warnings.warn((
Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
stderr_lines: <omitted>
stdout: |-
============================= test session starts ==============================
platform linux -- Python 3.10.12, pytest-8.1.0, pluggy-1.4.0 -- /home/akim/Desktop/venvs/deplo_test/bin/python3
cachedir: .pytest_cache
rootdir: /home/akim/Desktop/wazuh-qa/deployability/modules
plugins: testinfra-6.0.0, testinfra-10.1.0
collecting ... collected 1 item
modules/testing/tests/test_agent/test_stop.py::test_stop PASSED
=============================== warnings summary ===============================
modules/provision/models.py:65
/home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:65: 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', pre=True)
modules/provision/models.py:73
/home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:73: 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('uninstall', pre=True)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================== 1 passed, 2 warnings in 12.29s ========================
stdout_lines: <omitted>
PLAY RECAP *********************************************************************
localhost : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
[2024-03-21 13:10:22] [DEBUG] ANSIBLE: 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='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --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-03-21 13:10:22] [DEBUG] ANSIBLE: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/test.yml
[2024-03-21 13:10:22] [DEBUG] ANSIBLE: Using inventory: {'all': {'hosts': {'192.168.57.4': {'ansible_port': 22, 'ansible_user': 'vagrant', 'ansible_ssh_private_key_file': '/tmp/wazuh-qa/VAGRANT-62300D3C-6FC0-4235-B915-ED792442BAB0/instance_key'}}}}
[2024-03-21 13:10:22] [DEBUG] ANSIBLE: 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='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --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={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}'
- '--targets={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}'
- --live=True
- -s
delta: '0:00:11.527947'
end: '2024-03-21 13:10:42.197323'
msg: ''
rc: 0
start: '2024-03-21 13:10:30.669376'
stderr: |-
/home/akim/Desktop/venvs/deplo_test/lib/python3.10/site-packages/_testinfra_renamed.py:5: DeprecationWarning: testinfra package has been renamed to pytest-testinfra. Please `pip install pytest-testinfra` and `pip uninstall testinfra` and update your package requirements to avoid this message
warnings.warn((
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
stderr_lines: <omitted>
stdout: |-
============================= test session starts ==============================
platform linux -- Python 3.10.12, pytest-8.1.0, pluggy-1.4.0 -- /home/akim/Desktop/venvs/deplo_test/bin/python3
cachedir: .pytest_cache
rootdir: /home/akim/Desktop/wazuh-qa/deployability/modules
plugins: testinfra-6.0.0, testinfra-10.1.0
collecting ... collected 5 items
modules/testing/tests/test_agent/test_restart.py::test_restart PASSED
modules/testing/tests/test_agent/test_restart.py::test_status 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
=============================== warnings summary ===============================
modules/provision/models.py:65
/home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:65: 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', pre=True)
modules/provision/models.py:73
/home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:73: 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('uninstall', pre=True)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================== 5 passed, 2 warnings in 10.93s ========================
stdout_lines: <omitted>
PLAY RECAP *********************************************************************
localhost : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
[2024-03-21 13:10:42] [DEBUG] ANSIBLE: 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='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --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-03-21 13:10:42] [DEBUG] ANSIBLE: Rendering template /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/test.yml
[2024-03-21 13:10:42] [DEBUG] ANSIBLE: Using inventory: {'all': {'hosts': {'192.168.57.4': {'ansible_port': 22, 'ansible_user': 'vagrant', 'ansible_ssh_private_key_file': '/tmp/wazuh-qa/VAGRANT-62300D3C-6FC0-4235-B915-ED792442BAB0/instance_key'}}}}
[2024-03-21 13:10:42] [DEBUG] ANSIBLE: 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='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --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={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}'
- '--targets={wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}'
- --live=True
- -s
delta: '0:00:16.904793'
end: '2024-03-21 13:11:02.412994'
msg: ''
rc: 0
start: '2024-03-21 13:10:45.508201'
stderr: |-
/home/akim/Desktop/venvs/deplo_test/lib/python3.10/site-packages/_testinfra_renamed.py:5: DeprecationWarning: testinfra package has been renamed to pytest-testinfra. Please `pip install pytest-testinfra` and `pip uninstall testinfra` and update your package requirements to avoid this message
warnings.warn((
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_TIME = "es_ES.UTF-8",
LC_MONETARY = "es_ES.UTF-8",
LC_ADDRESS = "es_ES.UTF-8",
LC_TELEPHONE = "es_ES.UTF-8",
LC_NAME = "es_ES.UTF-8",
LC_MEASUREMENT = "es_ES.UTF-8",
LC_IDENTIFICATION = "es_ES.UTF-8",
LC_NUMERIC = "es_ES.UTF-8",
LC_PAPER = "es_ES.UTF-8",
LANG = "C.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("C.UTF-8").
locale: Cannot set LC_ALL to default locale: No such file or directory
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Removed /etc/systemd/system/multi-user.target.wants/wazuh-agent.service.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.4' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.57.3' (ED25519) to the list of known hosts.
stderr_lines: <omitted>
stdout: |-
============================= test session starts ==============================
platform linux -- Python 3.10.12, pytest-8.1.0, pluggy-1.4.0 -- /home/akim/Desktop/venvs/deplo_test/bin/python3
cachedir: .pytest_cache
rootdir: /home/akim/Desktop/wazuh-qa/deployability/modules
plugins: testinfra-6.0.0, testinfra-10.1.0
collecting ... collected 3 items
modules/testing/tests/test_agent/test_uninstall.py::test_uninstall PASSED
modules/testing/tests/test_agent/test_uninstall.py::test_agent_uninstalled_directory PASSED
modules/testing/tests/test_agent/test_uninstall.py::test_isActive PASSED
=============================== warnings summary ===============================
modules/provision/models.py:65
/home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:65: 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', pre=True)
modules/provision/models.py:73
/home/akim/Desktop/wazuh-qa/deployability/modules/provision/models.py:73: 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('uninstall', pre=True)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================== 3 passed, 2 warnings in 16.32s ========================
stdout_lines: <omitted>
PLAY RECAP *********************************************************************
localhost : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
[2024-03-21 13:11:02] [DEBUG] ANSIBLE: 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='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml}' --targets='{wazuh-1: /tmp/dtt1-poc/manager-linux-ubuntu-22.04-amd64/inventory.yml, agent-1: /tmp/dtt1-poc/manager-linux-ubuntu-20.04-amd64/inventory.yml}' --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-03-21 13:11:02] [DEBUG] ANSIBLE: Using inventory: {'all': {'hosts': {'192.168.57.4': {'ansible_port': 22, 'ansible_user': 'vagrant', 'ansible_ssh_private_key_file': '/tmp/wazuh-qa/VAGRANT-62300D3C-6FC0-4235-B915-ED792442BAB0/instance_key'}}}}
[2024-03-21 13:11:02] [DEBUG] ANSIBLE: 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: [192.168.57.4]
TASK [Clean test directory] ****************************************************
ok: [192.168.57.4] => changed=false
path: /tmp/tests
state: absent
PLAY RECAP *********************************************************************
192.168.57.4 : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
[2024-03-21 13:11:05] [DEBUG] ANSIBLE: Playbook /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/cleanup.yml finished with status {'skipped': {}, 'ok': {'192.168.57.4': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'192.168.57.4': 1}, 'changed': {}}
[2024-03-21 13:11:05] [DEBUG] ANSIBLE: Using inventory: {'all': {'hosts': {'192.168.57.4': {'ansible_port': 22, 'ansible_user': 'vagrant', 'ansible_ssh_private_key_file': '/tmp/wazuh-qa/VAGRANT-62300D3C-6FC0-4235-B915-ED792442BAB0/instance_key'}}}}
[2024-03-21 13:11:05] [DEBUG] ANSIBLE: 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: [192.168.57.4]
TASK [Clean test directory] ****************************************************
ok: [192.168.57.4] => changed=false
path: /tmp/tests
state: absent
PLAY RECAP *********************************************************************
192.168.57.4 : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
[2024-03-21 13:11:08] [DEBUG] ANSIBLE: Playbook /home/akim/Desktop/wazuh-qa/deployability/modules/testing/playbooks/cleanup.yml finished with status {'skipped': {}, 'ok': {'192.168.57.4': 2}, 'dark': {}, 'failures': {}, 'ignored': {}, 'rescued': {}, 'processed': {'192.168.57.4': 1}, 'changed': {}}
|
Meet resume
|
UpdateTests results in AWS
redhat7[2024-03-21 15:41:06] [ERROR] [282453] [ThreadPoolExecutor-0_0] [workflow_engine]: [allocate-manager-linux-redhat-7-amd64] Task failed with error: Error executing process task Traceback (most recent call last):
File "/home/akim/Desktop/test/wazuh-qa/deployability/modules/allocation/main.py", line 34, in <module>
main()
File "/home/akim/Desktop/test/wazuh-qa/deployability/modules/allocation/main.py", line 30, in main
Allocator.run(InputPayload(**vars(parse_arguments())))
File "/home/akim/Desktop/test/wazuh-qa/deployability/modules/allocation/allocation.py", line 31, in run
return cls.__create(payload)
File "/home/akim/Desktop/test/wazuh-qa/deployability/modules/allocation/allocation.py", line 50, in __create
instance = provider.create_instance(
File "/home/akim/Desktop/test/wazuh-qa/deployability/modules/allocation/generic/provider.py", line 66, in create_instance
return cls._create_instance(base_dir, params, config, ssh_key)
File "/home/akim/Desktop/test/wazuh-qa/deployability/modules/allocation/aws/provider.py", line 115, in _create_instance
instance_id = cls.__create_ec2_instance(config)
File "/home/akim/Desktop/test/wazuh-qa/deployability/modules/allocation/aws/provider.py", line 215, in __create_ec2_instance
instance = client.create_instances(**params)[0]
File "/home/akim/Desktop/venvs/deplo_test/lib/python3.10/site-packages/boto3/resources/factory.py", line 580, in do_action
response = action(self, *args, **kwargs)
File "/home/akim/Desktop/venvs/deplo_test/lib/python3.10/site-packages/boto3/resources/action.py", line 88, in __call__
response = getattr(parent.meta.client, operation_name)(*args, **params)
File "/home/akim/Desktop/venvs/deplo_test/lib/python3.10/site-packages/botocore/client.py", line 535, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/home/akim/Desktop/venvs/deplo_test/lib/python3.10/site-packages/botocore/client.py", line 983, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (OptInRequired) when calling the RunInstances operation: In order to use this AWS Marketplace product you need to accept terms and subscribe. To do so please visit https://aws.amazon.com/marketplace/pp?sku=3jdidj7kpc10apzarpkkyoe3t opensuse[2024-03-21 13:48:22] [INFO] [257840] [ThreadPoolExecutor-0_0] [workflow_engine]: [allocate-manager-linux-opensuse-15-amd64] Starting task.
[2024-03-21 13:48:24] [ERROR] [257840] [ThreadPoolExecutor-0_0] [workflow_engine]: [allocate-manager-linux-opensuse-15-amd64] Task failed with error: Error executing process task Traceback (most recent call last):
File "/home/akim/Desktop/test/wazuh-qa/deployability/modules/allocation/main.py", line 34, in <module>
main()
File "/home/akim/Desktop/test/wazuh-qa/deployability/modules/allocation/main.py", line 30, in main
Allocator.run(InputPayload(**vars(parse_arguments())))
File "/home/akim/Desktop/test/wazuh-qa/deployability/modules/allocation/allocation.py", line 31, in run
return cls.__create(payload)
File "/home/akim/Desktop/test/wazuh-qa/deployability/modules/allocation/allocation.py", line 50, in __create
instance = provider.create_instance(
File "/home/akim/Desktop/test/wazuh-qa/deployability/modules/allocation/generic/provider.py", line 66, in create_instance
return cls._create_instance(base_dir, params, config, ssh_key)
File "/home/akim/Desktop/test/wazuh-qa/deployability/modules/allocation/aws/provider.py", line 115, in _create_instance
instance_id = cls.__create_ec2_instance(config)
File "/home/akim/Desktop/test/wazuh-qa/deployability/modules/allocation/aws/provider.py", line 215, in __create_ec2_instance
instance = client.create_instances(**params)[0]
File "/home/akim/Desktop/venvs/deplo_test/lib/python3.10/site-packages/boto3/resources/factory.py", line 580, in do_action
response = action(self, *args, **kwargs)
File "/home/akim/Desktop/venvs/deplo_test/lib/python3.10/site-packages/boto3/resources/action.py", line 88, in __call__
response = getattr(parent.meta.client, operation_name)(*args, **params)
File "/home/akim/Desktop/venvs/deplo_test/lib/python3.10/site-packages/botocore/client.py", line 535, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/home/akim/Desktop/venvs/deplo_test/lib/python3.10/site-packages/botocore/client.py", line 983, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (OptInRequired) when calling the RunInstances operation: In order to use this AWS Marketplace product you need to accept terms and subscribe. To do so please visit https://aws.amazon.com/marketplace/pp?sku=147aomaaws9zx4er41jp3mozy
|
UpdateChanges done. Moved to pending review |
LGTM |
Description
This issue aims to improve and complete the wazuh-agent tests generated in the first iterations of DTT1
Tasks
The text was updated successfully, but these errors were encountered: