Skip to content
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

Adapt reliability test to run with python 3.7 #4478

Merged
merged 2 commits into from
Sep 12, 2023

Conversation

GGP1
Copy link
Member

@GGP1 GGP1 commented Aug 29, 2023

Related issue
Closes #4299

Description

Removed the walrus operator from the tests/reliability/test_cluster/test_cluster_logs/test_cluster_master_logs_order/test_cluster_master_logs_order.py test to support running it in Python 3.7.

Re-created PR to merge it in 4.5.3

Logs

(venv3.7) gasti@pop-os:~/work/wazuh-qa$ python --version
Python 3.7.17
(venv3.7) gasti@pop-os:~/work/wazuh-qa$ python3 -m pytest -vv --disable-warnings tests/reliability/test_cluster/test_cluster_logs/test_cluster_master_logs_order/ --artifacts_path=/home/gasti/work/wazuh-qa/tests/reliability/test_cluster/test_cluster_logs/test_cluster_master_logs_order --html=report.html --self-contained-html
=================================================================== test session starts ===================================================================
platform linux -- Python 3.7.17, pytest-7.1.2, pluggy-0.13.1 -- /home/gasti/work/wazuh-qa/venv3.7/bin/python3
cachedir: .pytest_cache
metadata: {'Python': '3.7.17', 'Platform': 'Linux-6.2.0-76060200-generic-x86_64-with-Pop-22.04-jammy', 'Packages': {'pytest': '7.1.2', 'pluggy': '0.13.1'}, 'Plugins': {'html': '3.1.1', 'testinfra': '5.0.0', 'metadata': '3.0.0'}}
rootdir: /home/gasti/work/wazuh-qa/tests, configfile: pytest.ini
plugins: html-3.1.1, testinfra-5.0.0, metadata-3.0.0
collected 1 item                                                                                                                                          

tests/reliability/test_cluster/test_cluster_logs/test_cluster_master_logs_order/test_cluster_master_logs_order.py::test_check_logs_order_master PASSED [100%]

-------------------------------------------- generated html file: file:///home/gasti/work/wazuh-qa/report.html --------------------------------------------
==================================================================== 1 passed in 0.01s ====================================================================

Report

cluster_logs_Test

@GGP1 GGP1 self-assigned this Aug 29, 2023
@GGP1 GGP1 changed the base branch from master to 4.5.3 August 29, 2023 12:59
@GGP1 GGP1 requested a review from Selutario August 29, 2023 13:06
Copy link
Contributor

@Selutario Selutario left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GGP1, I forgot to mention, please add the output of 3 executions (as in this example)

@GGP1
Copy link
Member Author

GGP1 commented Aug 30, 2023

Executions

Run 1
(venv3.7) gasti@pop-os:~/work/wazuh-qa$ date --utc; python3 -m pytest -vv --disable-warnings tests/reliability/test_cluster/test_cluster_logs/test_cluster_master_logs_order/test_cluster_master_logs_order.py --artifacts_path=artifacts --html=report.html --self-contained-html
Wed Aug 30 02:19:31 PM UTC 2023
======================================================== test session starts =========================================================
platform linux -- Python 3.7.17, pytest-7.1.2, pluggy-0.13.1 -- /home/gasti/work/wazuh-qa/venv3.7/bin/python3
cachedir: .pytest_cache
metadata: {'Python': '3.7.17', 'Platform': 'Linux-6.2.0-76060200-generic-x86_64-with-Pop-22.04-jammy', 'Packages': {'pytest': '7.1.2', 'pluggy': '0.13.1'}, 'Plugins': {'html': '3.1.1', 'testinfra': '5.0.0', 'metadata': '3.0.0'}}
rootdir: /home/gasti/work/wazuh-qa/tests, configfile: pytest.ini
plugins: html-3.1.1, testinfra-5.0.0, metadata-3.0.0
collected 1 item                                                                                                                     

tests/reliability/test_cluster/test_cluster_logs/test_cluster_master_logs_order/test_cluster_master_logs_order.py::test_check_logs_order_master PASSED [100%]

--------------------------------- generated html file: file:///home/gasti/work/wazuh-qa/report.html ----------------------------------
========================================================= 1 passed in 0.01s ==========================================================
Run 2
(venv3.7) gasti@pop-os:~/work/wazuh-qa$ date --utc; python3 -m pytest -vv --disable-warnings tests/reliability/test_cluster/test_cluster_logs/test_cluster_master_logs_order/test_cluster_master_logs_order.py --artifacts_path=artifacts --html=report.html --self-contained-html
Wed Aug 30 02:19:42 PM UTC 2023
======================================================== test session starts =========================================================
platform linux -- Python 3.7.17, pytest-7.1.2, pluggy-0.13.1 -- /home/gasti/work/wazuh-qa/venv3.7/bin/python3
cachedir: .pytest_cache
metadata: {'Python': '3.7.17', 'Platform': 'Linux-6.2.0-76060200-generic-x86_64-with-Pop-22.04-jammy', 'Packages': {'pytest': '7.1.2', 'pluggy': '0.13.1'}, 'Plugins': {'html': '3.1.1', 'testinfra': '5.0.0', 'metadata': '3.0.0'}}
rootdir: /home/gasti/work/wazuh-qa/tests, configfile: pytest.ini
plugins: html-3.1.1, testinfra-5.0.0, metadata-3.0.0
collected 1 item                                                                                                                     

tests/reliability/test_cluster/test_cluster_logs/test_cluster_master_logs_order/test_cluster_master_logs_order.py::test_check_logs_order_master PASSED [100%]

--------------------------------- generated html file: file:///home/gasti/work/wazuh-qa/report.html ----------------------------------
========================================================= 1 passed in 0.01s ==========================================================
Run 3
(venv3.7) gasti@pop-os:~/work/wazuh-qa$ date --utc; python3 -m pytest -vv --disable-warnings tests/reliability/test_cluster/test_cluster_logs/test_cluster_master_logs_order/test_cluster_master_logs_order.py --artifacts_path=artifacts --html=report.html --self-contained-html
Wed Aug 30 02:19:56 PM UTC 2023
======================================================== test session starts =========================================================
platform linux -- Python 3.7.17, pytest-7.1.2, pluggy-0.13.1 -- /home/gasti/work/wazuh-qa/venv3.7/bin/python3
cachedir: .pytest_cache
metadata: {'Python': '3.7.17', 'Platform': 'Linux-6.2.0-76060200-generic-x86_64-with-Pop-22.04-jammy', 'Packages': {'pytest': '7.1.2', 'pluggy': '0.13.1'}, 'Plugins': {'html': '3.1.1', 'testinfra': '5.0.0', 'metadata': '3.0.0'}}
rootdir: /home/gasti/work/wazuh-qa/tests, configfile: pytest.ini
plugins: html-3.1.1, testinfra-5.0.0, metadata-3.0.0
collected 1 item                                                                                                                     

tests/reliability/test_cluster/test_cluster_logs/test_cluster_master_logs_order/test_cluster_master_logs_order.py::test_check_logs_order_master PASSED [100%]

--------------------------------- generated html file: file:///home/gasti/work/wazuh-qa/report.html ----------------------------------
========================================================= 1 passed in 0.01s ==========================================================

CHANGELOG.md Outdated Show resolved Hide resolved
Selutario
Selutario previously approved these changes Aug 31, 2023
damarisg
damarisg previously approved these changes Aug 31, 2023
@GGP1 GGP1 dismissed stale reviews from damarisg and Selutario via 1002022 September 8, 2023 12:14
@GGP1 GGP1 force-pushed the fix/4299-reliability-test-python3.7-4.5.3 branch from bd6d130 to 1002022 Compare September 8, 2023 12:14
@davidjiglesias davidjiglesias merged commit 480d357 into 4.5.3 Sep 12, 2023
4 checks passed
@davidjiglesias davidjiglesias deleted the fix/4299-reliability-test-python3.7-4.5.3 branch September 12, 2023 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reliability test fails in workload benchmark test
4 participants