s2i-python-container icon indicating copy to clipboard operation
s2i-python-container copied to clipboard

Add more verbose output from pytest suite

Open phracek opened this issue 1 year ago • 9 comments

This pull request only adds more verbose output from pytest module.

We would like to see what's happened during the tests.

phracek avatar Jun 26 '24 13:06 phracek

[test-openshift-pytest]

phracek avatar Jun 26 '24 13:06 phracek

The output looks great. See https://artifacts.osci.redhat.com/testing-farm/8a939e48-ed7d-4491-83c2-ae79c8620f39/. We can see progress of the tests and 'short test summary info' as well.

=========================== short test summary info ============================
PASSED test_deploy_templates.py::TestDeployTemplate::()::test_python_template_inside_cluster[django-postgresql.json]
PASSED test_deploy_templates.py::TestDeployTemplate::()::test_python_template_inside_cluster[django-postgresql-persistent.json]
PASSED test_imagestreams_quickstart.py::TestImagestreamsQuickstart::()::test_python_template_inside_cluster[django-postgresql.json]
PASSED test_imagestreams_quickstart.py::TestImagestreamsQuickstart::()::test_python_template_inside_cluster[django-postgresql-persistent.json]
PASSED test_python_ex_standalone.py::TestPythonExTemplate::()::test_python_ex_template_inside_cluster
PASSED test_python_ex_template.py::TestPythonExTemplate::()::test_python_ex_template_inside_cluster

phracek avatar Jun 27 '24 06:06 phracek

In case there is something, that I have missing from PyTest arguments, improvements are welcome, as commented in this pull request.

phracek avatar Jun 27 '24 06:06 phracek

Le't run all tests. For sure.

[test-all]

phracek avatar Jun 28 '24 13:06 phracek

@frenzymadness It is interesting issue: Testing Farm - RHEL8 - PyTest - OpenShift 4 - 3.11 and in logs https://artifacts.osci.redhat.com/testing-farm/b786a35c-ed0a-457e-a35a-6e622cf2a4da/ at the end is no 'summary info' But in Testing Farm - RHEL9 - PyTest - OpenShift 4 - 3.11 and in logs https://artifacts.osci.redhat.com/testing-farm/866f4180-ce8f-47b2-a65d-b6fc245897dc/ at the end is summary:

=========================== short test summary info ============================
PASSED test_deploy_templates.py::TestDeployTemplate::test_python_template_inside_cluster[django-postgresql.json]
PASSED test_deploy_templates.py::TestDeployTemplate::test_python_template_inside_cluster[django-postgresql-persistent.json]
PASSED test_imagestreams_quickstart.py::TestImagestreamsQuickstart::test_python_template_inside_cluster[django-postgresql.json]
PASSED test_imagestreams_quickstart.py::TestImagestreamsQuickstart::test_python_template_inside_cluster[django-postgresql-persistent.json]
PASSED test_python_ex_standalone.py::TestPythonExTemplate::test_python_ex_template_inside_cluster
PASSED test_python_ex_template.py::TestPythonExTemplate::test_python_ex_template_inside_cluster
================== 6 passed, 4 warnings in 651.28s (0:10:51) ===================

phracek avatar Jul 02 '24 13:07 phracek

If you use main Python (3.6 in RHEL 8, 3.9 in RHEL 9) it might also lead to different pytest versions being installed due to newest pytest not supporting Python 3.6.

frenzymadness avatar Jul 02 '24 17:07 frenzymadness

Let's move to latest Python and use rpm-based pytest if possible on all RHEL versions.

pkubatrh avatar Jul 03 '24 08:07 pkubatrh

See downstream ticket here: https://gitlab.cee.redhat.com/platform-eng-core-services/sclorg-tmt-plans/-/merge_requests/205

phracek avatar Jul 03 '24 12:07 phracek

Run the tests as soon as this MR is merged https://gitlab.cee.redhat.com/platform-eng-core-services/sclorg-tmt-plans/-/merge_requests/205

phracek avatar Jul 03 '24 13:07 phracek

Python-3.12 tests are here: https://github.com/sclorg/s2i-ruby-container/pull/551 and especially here: http://artifacts.osci.redhat.com/testing-farm/eb7859e2-aadc-4982-875c-a7de06d22597

phracek avatar Jul 04 '24 08:07 phracek

[test-openshift-pytest]

phracek avatar Jul 04 '24 08:07 phracek