From 1ef68a086f02296db5c6c0d1f9f3ed73a156bf8f Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Tue, 11 Nov 2025 15:40:23 +0100 Subject: [PATCH 1/4] Rename test_* python files for OpenShift to `test_ocp`. Also VARS.* variables are used during the migration. Signed-off-by: Petr "Stone" Hracek --- test/test_deploy_templates.py | 56 --------------- test/test_imagestreams_quickstart.py | 69 ------------------- test/test_ocp_deploy_templates.py | 46 +++++++++++++ ....py => test_ocp_helm_python_django_app.py} | 29 ++++---- ...ocp_helm_python_django_psql_persistent.py} | 24 ++++--- ...y => test_ocp_helm_python_imagestreams.py} | 19 +++-- test/test_ocp_imagestreams_quickstart.py | 61 ++++++++++++++++ ...ams.py => test_ocp_latest_imagestreams.py} | 3 +- ...ne.py => test_ocp_python_ex_standalone.py} | 15 ++-- ...late.py => test_ocp_python_ex_template.py} | 20 +++--- 10 files changed, 168 insertions(+), 174 deletions(-) delete mode 100644 test/test_deploy_templates.py delete mode 100644 test/test_imagestreams_quickstart.py create mode 100644 test/test_ocp_deploy_templates.py rename test/{test_helm_python_django_app.py => test_ocp_helm_python_django_app.py} (57%) rename test/{test_helm_python_django_psql_persistent.py => test_ocp_helm_python_django_psql_persistent.py} (68%) rename test/{test_helm_python_imagestreams.py => test_ocp_helm_python_imagestreams.py} (71%) create mode 100644 test/test_ocp_imagestreams_quickstart.py rename test/{test_latest_imagestreams.py => test_ocp_latest_imagestreams.py} (91%) rename test/{test_python_ex_standalone.py => test_ocp_python_ex_standalone.py} (58%) rename test/{test_python_ex_template.py => test_ocp_python_ex_template.py} (52%) diff --git a/test/test_deploy_templates.py b/test/test_deploy_templates.py deleted file mode 100644 index 3d265f60..00000000 --- a/test/test_deploy_templates.py +++ /dev/null @@ -1,56 +0,0 @@ -import pytest -from packaging.version import Version - -from container_ci_suite.openshift import OpenShiftAPI - -from conftest import VARS - -BRANCH_TO_TEST = "2.2.x" -DEPLOYED_PSQL_IMAGE = "quay.io/sclorg/postgresql-10-c8s:c8s" -IMAGE_TAG = "postgresql:10" -PSQL_VERSION = "10" - -if Version(VARS.VERSION_NO_MINIMAL) >= Version("3.11"): - BRANCH_TO_TEST = "4.2.x" - DEPLOYED_PSQL_IMAGE = "quay.io/sclorg/postgresql-12-c8s" - IMAGE_TAG = "postgresql:12" - PSQL_VERSION = "12" - - -# Replacement with 'test_python_s2i_templates' -class TestDeployTemplate: - - def setup_method(self): - self.oc_api = OpenShiftAPI(pod_name_prefix=f"python-{VARS.SHORT_VERSION}-test", version=VARS.VERSION_NO_MINIMAL, shared_cluster=True) - - def teardown_method(self): - self.oc_api.delete_project() - - @pytest.mark.parametrize( - "template", - [ - "django-postgresql.json", - "django-postgresql-persistent.json" - ] - ) - def test_python_template_inside_cluster(self, template): - assert self.oc_api.upload_image(DEPLOYED_PSQL_IMAGE, IMAGE_TAG) - service_name = f"python-{VARS.SHORT_VERSION}-test" - template_url = self.oc_api.get_raw_url_for_json( - container="django-ex", dir="openshift/templates", filename=template, branch=BRANCH_TO_TEST - ) - assert self.oc_api.deploy_template_with_image( - image_name=VARS.IMAGE_NAME, - template=template_url, - name_in_template="python", - openshift_args=[ - f"SOURCE_REPOSITORY_REF={BRANCH_TO_TEST}", - f"PYTHON_VERSION={VARS.VERSION_NO_MINIMAL}", - f"NAME={service_name}", - f"POSTGRESQL_VERSION={PSQL_VERSION}" - ] - ) - assert self.oc_api.is_template_deployed(name_in_template=service_name) - assert self.oc_api.check_response_inside_cluster( - name_in_template=service_name, expected_output="Welcome to your Django application on OpenShift" - ) diff --git a/test/test_imagestreams_quickstart.py b/test/test_imagestreams_quickstart.py deleted file mode 100644 index 07c7c23d..00000000 --- a/test/test_imagestreams_quickstart.py +++ /dev/null @@ -1,69 +0,0 @@ -import pytest -from packaging.version import Version - -from container_ci_suite.openshift import OpenShiftAPI - -from conftest import VARS - -BRANCH_TO_TEST = "2.2.x" -DEPLOYED_PSQL_IMAGE = "quay.io/sclorg/postgresql-10-c8s:c8s" -IMAGE_TAG = "postgresql:10" -PSQL_VERSION = "10" - -if Version(VARS.VERSION_NO_MINIMAL) >= Version("3.11"): - BRANCH_TO_TEST = "4.2.x" - DEPLOYED_PSQL_IMAGE = "quay.io/sclorg/postgresql-12-c8s" - IMAGE_TAG = "postgresql:12" - PSQL_VERSION = "12" - - -# Replacement with 'test_python_s2i_templates' -class TestImagestreamsQuickstart: - - def setup_method(self): - self.oc_api = OpenShiftAPI(pod_name_prefix=f"python-{VARS.SHORT_VERSION}-test", version=VARS.VERSION_NO_MINIMAL, shared_cluster=True) - - def teardown_method(self): - self.oc_api.delete_project() - - @pytest.mark.parametrize( - "template", - [ - "django.json", - "django-postgresql-persistent.json" - ] - ) - def test_python_template_inside_cluster(self, template): - if self.oc_api.shared_cluster: - assert self.oc_api.upload_image_to_external_registry(DEPLOYED_PSQL_IMAGE, IMAGE_TAG) - else: - assert self.oc_api.upload_image(DEPLOYED_PSQL_IMAGE, IMAGE_TAG) - service_name = f"python-{VARS.SHORT_VERSION}-test" - template_url = self.oc_api.get_raw_url_for_json( - container="django-ex", dir="openshift/templates", filename=template, branch=BRANCH_TO_TEST - ) - openshift_args = [ - f"SOURCE_REPOSITORY_REF={BRANCH_TO_TEST}", - f"PYTHON_VERSION={VARS.VERSION_NO_MINIMAL}", - f"NAME={service_name}" - ] - if template != "django.json": - openshift_args = [ - f"SOURCE_REPOSITORY_REF={BRANCH_TO_TEST}", - f"POSTGRESQL_VERSION={PSQL_VERSION}", - f"PYTHON_VERSION={VARS.VERSION_NO_MINIMAL}", - f"NAME={service_name}", - f"DATABASE_USER=testu", - f"DATABASE_PASSWORD=testp" - ] - assert self.oc_api.imagestream_quickstart( - imagestream_file="imagestreams/python-rhel.json", - template_file=template_url, - image_name=VARS.IMAGE_NAME, - name_in_template="python", - openshift_args=openshift_args - ) - assert self.oc_api.is_template_deployed(name_in_template=service_name) - assert self.oc_api.check_response_inside_cluster( - name_in_template=service_name, expected_output="Welcome to your Django application on OpenShift" - ) diff --git a/test/test_ocp_deploy_templates.py b/test/test_ocp_deploy_templates.py new file mode 100644 index 00000000..535598cf --- /dev/null +++ b/test/test_ocp_deploy_templates.py @@ -0,0 +1,46 @@ +import pytest + +from container_ci_suite.openshift import OpenShiftAPI + +from conftest import VARS + + +class TestDeployTemplate: + def setup_method(self): + self.oc_api = OpenShiftAPI( + pod_name_prefix=f"python-{VARS.SHORT_VERSION}-test", + version=VARS.VERSION_NO_MINIMAL, + shared_cluster=True, + ) + + def teardown_method(self): + self.oc_api.delete_project() + + @pytest.mark.parametrize( + "template", ["django-postgresql.json", "django-postgresql-persistent.json"] + ) + def test_python_template_inside_cluster(self, template): + assert self.oc_api.upload_image(VARS.DEPLOYED_PSQL_IMAGE, VARS.IMAGE_TAG) + service_name = f"python-{VARS.SHORT_VERSION}-test" + template_url = self.oc_api.get_raw_url_for_json( + container="django-ex", + dir="openshift/templates", + filename=template, + branch=VARS.BRANCH_TO_TEST, + ) + assert self.oc_api.deploy_template_with_image( + image_name=VARS.IMAGE_NAME, + template=template_url, + name_in_template="python", + openshift_args=[ + f"SOURCE_REPOSITORY_REF={VARS.BRANCH_TO_TEST}", + f"PYTHON_VERSION={VARS.VERSION_NO_MINIMAL}", + f"NAME={service_name}", + f"POSTGRESQL_VERSION={VARS.PSQL_VERSION}", + ], + ) + assert self.oc_api.is_template_deployed(name_in_template=service_name) + assert self.oc_api.check_response_inside_cluster( + name_in_template=service_name, + expected_output="Welcome to your Django application on OpenShift", + ) diff --git a/test/test_helm_python_django_app.py b/test/test_ocp_helm_python_django_app.py similarity index 57% rename from test/test_helm_python_django_app.py rename to test/test_ocp_helm_python_django_app.py index e2fdecea..9980f70f 100644 --- a/test/test_helm_python_django_app.py +++ b/test/test_ocp_helm_python_django_app.py @@ -2,25 +2,20 @@ from conftest import skip_helm_charts_tests, VARS -DEPLOYED_PSQL_IMAGE = "quay.io/sclorg/postgresql-10-c8s:c8s" -IMAGE_TAG = "postgresql:10" -PSQL_VERSION = "10" -BRANCH_TO_TEST = "2.2.x" - -if VARS.VERSION in ("3.11", "3.12", "3.12-minimal"): - DEPLOYED_PSQL_IMAGE = "quay.io/sclorg/postgresql-12-c8s" - IMAGE_TAG = "postgresql:12" - PSQL_VERSION = "12" - BRANCH_TO_TEST = "4.2.x" class TestHelmPythonDjangoAppTemplate: - def setup_method(self): package_name = "redhat-python-django-application" - self.hc_api = HelmChartsAPI(path=VARS.TEST_DIR, package_name=package_name, tarball_dir=VARS.TEST_DIR, shared_cluster=True) + self.hc_api = HelmChartsAPI( + path=VARS.TEST_DIR, + package_name=package_name, + tarball_dir=VARS.TEST_DIR, + shared_cluster=True, + ) self.hc_api.clone_helm_chart_repo( - repo_url="https://github.com/sclorg/helm-charts", repo_name="helm-charts", - subdir="charts/redhat" + repo_url="https://github.com/sclorg/helm-charts", + repo_name="helm-charts", + subdir="charts/redhat", ) def teardown_method(self): @@ -37,8 +32,10 @@ def test_django_application_helm_test(self): values={ "python_version": f"{VARS.VERSION}{VARS.TAG}", "namespace": self.hc_api.namespace, - "source_repository_ref": BRANCH_TO_TEST, + "source_repository_ref": VARS.BRANCH_TO_TEST, } ) assert self.hc_api.is_s2i_pod_running(pod_name_prefix="django-example") - assert self.hc_api.test_helm_chart(expected_str=["Welcome to your Django application"]) + assert self.hc_api.test_helm_chart( + expected_str=["Welcome to your Django application"] + ) diff --git a/test/test_helm_python_django_psql_persistent.py b/test/test_ocp_helm_python_django_psql_persistent.py similarity index 68% rename from test/test_helm_python_django_psql_persistent.py rename to test/test_ocp_helm_python_django_psql_persistent.py index 117c6aed..df388c84 100644 --- a/test/test_helm_python_django_psql_persistent.py +++ b/test/test_ocp_helm_python_django_psql_persistent.py @@ -2,20 +2,20 @@ from conftest import skip_helm_charts_tests, VARS -BRANCH_TO_TEST = "2.2.x" - -if VARS.VERSION in ("3.11", "3.12", "3.12-minimal"): - BRANCH_TO_TEST = "4.2.x" - class TestHelmPythonDjangoPsqlTemplate: - def setup_method(self): package_name = "redhat-django-psql-persistent" - self.hc_api = HelmChartsAPI(path=VARS.TEST_DIR, package_name=package_name, tarball_dir=VARS.TEST_DIR, shared_cluster=True) + self.hc_api = HelmChartsAPI( + path=VARS.TEST_DIR, + package_name=package_name, + tarball_dir=VARS.TEST_DIR, + shared_cluster=True, + ) self.hc_api.clone_helm_chart_repo( - repo_url="https://github.com/sclorg/helm-charts", repo_name="helm-charts", - subdir="charts/redhat" + repo_url="https://github.com/sclorg/helm-charts", + repo_name="helm-charts", + subdir="charts/redhat", ) def teardown_method(self): @@ -35,8 +35,10 @@ def test_django_psql_helm_test(self): values={ "python_version": f"{VARS.VERSION}{VARS.TAG}", "namespace": self.hc_api.namespace, - "source_repository_ref": BRANCH_TO_TEST, + "source_repository_ref": VARS.BRANCH_TO_TEST, } ) assert self.hc_api.is_s2i_pod_running(pod_name_prefix="django-psql") - assert self.hc_api.test_helm_chart(expected_str=["Welcome to your Django application"]) + assert self.hc_api.test_helm_chart( + expected_str=["Welcome to your Django application"] + ) diff --git a/test/test_helm_python_imagestreams.py b/test/test_ocp_helm_python_imagestreams.py similarity index 71% rename from test/test_helm_python_imagestreams.py rename to test/test_ocp_helm_python_imagestreams.py index 4f61a290..ff9959bc 100644 --- a/test/test_helm_python_imagestreams.py +++ b/test/test_ocp_helm_python_imagestreams.py @@ -4,14 +4,20 @@ from conftest import VARS -class TestHelmRHELPythonImageStreams: +class TestHelmRHELPythonImageStreams: def setup_method(self): package_name = "redhat-python-imagestreams" - self.hc_api = HelmChartsAPI(path=VARS.TEST_DIR, package_name=package_name, tarball_dir=VARS.TEST_DIR, shared_cluster=True) + self.hc_api = HelmChartsAPI( + path=VARS.TEST_DIR, + package_name=package_name, + tarball_dir=VARS.TEST_DIR, + shared_cluster=True, + ) self.hc_api.clone_helm_chart_repo( - repo_url="https://github.com/sclorg/helm-charts", repo_name="helm-charts", - subdir="charts/redhat" + repo_url="https://github.com/sclorg/helm-charts", + repo_name="helm-charts", + subdir="charts/redhat", ) def teardown_method(self): @@ -20,7 +26,10 @@ def teardown_method(self): @pytest.mark.parametrize( "version,registry", [ - ("3.12-minimal-ubi10", "registry.redhat.io/ubi10/python-312-minimal:latest"), + ( + "3.12-minimal-ubi10", + "registry.redhat.io/ubi10/python-312-minimal:latest", + ), ("3.12-ubi9", "registry.redhat.io/ubi9/python-312:latest"), ("3.12-ubi8", "registry.redhat.io/ubi8/python-312:latest"), ("3.11-ubi9", "registry.redhat.io/ubi9/python-311:latest"), diff --git a/test/test_ocp_imagestreams_quickstart.py b/test/test_ocp_imagestreams_quickstart.py new file mode 100644 index 00000000..ac59aabd --- /dev/null +++ b/test/test_ocp_imagestreams_quickstart.py @@ -0,0 +1,61 @@ +import pytest + +from container_ci_suite.openshift import OpenShiftAPI + +from conftest import VARS + + +class TestImagestreamsQuickstart: + def setup_method(self): + self.oc_api = OpenShiftAPI( + pod_name_prefix=f"python-{VARS.SHORT_VERSION}-test", + version=VARS.VERSION_NO_MINIMAL, + shared_cluster=True, + ) + + def teardown_method(self): + self.oc_api.delete_project() + + @pytest.mark.parametrize( + "template", ["django.json", "django-postgresql-persistent.json"] + ) + def test_python_template_inside_cluster(self, template): + if self.oc_api.shared_cluster: + assert self.oc_api.upload_image_to_external_registry( + VARS.DEPLOYED_PSQL_IMAGE, VARS.IMAGE_TAG + ) + else: + assert self.oc_api.upload_image(VARS.DEPLOYED_PSQL_IMAGE, VARS.IMAGE_TAG) + service_name = f"python-{VARS.SHORT_VERSION}-test" + template_url = self.oc_api.get_raw_url_for_json( + container="django-ex", + dir="openshift/templates", + filename=template, + branch=VARS.BRANCH_TO_TEST, + ) + openshift_args = [ + f"SOURCE_REPOSITORY_REF={VARS.BRANCH_TO_TEST}", + f"PYTHON_VERSION={VARS.VERSION_NO_MINIMAL}", + f"NAME={service_name}", + ] + if template != "django.json": + openshift_args = [ + f"SOURCE_REPOSITORY_REF={VARS.BRANCH_TO_TEST}", + f"POSTGRESQL_VERSION={VARS.PSQL_VERSION}", + f"PYTHON_VERSION={VARS.VERSION_NO_MINIMAL}", + f"NAME={service_name}", + "DATABASE_USER=testu", + "DATABASE_PASSWORD=testp", + ] + assert self.oc_api.imagestream_quickstart( + imagestream_file="imagestreams/python-rhel.json", + template_file=template_url, + image_name=VARS.IMAGE_NAME, + name_in_template="python", + openshift_args=openshift_args, + ) + assert self.oc_api.is_template_deployed(name_in_template=service_name) + assert self.oc_api.check_response_inside_cluster( + name_in_template=service_name, + expected_output="Welcome to your Django application on OpenShift", + ) diff --git a/test/test_latest_imagestreams.py b/test/test_ocp_latest_imagestreams.py similarity index 91% rename from test/test_latest_imagestreams.py rename to test/test_ocp_latest_imagestreams.py index 1d6a4d99..ef1cd424 100644 --- a/test/test_latest_imagestreams.py +++ b/test/test_ocp_latest_imagestreams.py @@ -5,11 +5,10 @@ # Replacement with 'test_latest_imagestreams' class TestLatestImagestreams: - def setup_method(self): self.isc = ImageStreamChecker(working_dir=VARS.TEST_DIR.parent.parent) def test_latest_imagestream(self): self.latest_version = self.isc.get_latest_version() - assert self.latest_version != "" + assert self.latest_version self.isc.check_imagestreams(self.latest_version) diff --git a/test/test_python_ex_standalone.py b/test/test_ocp_python_ex_standalone.py similarity index 58% rename from test/test_python_ex_standalone.py rename to test/test_ocp_python_ex_standalone.py index e9813e08..4973f7fd 100644 --- a/test/test_python_ex_standalone.py +++ b/test/test_ocp_python_ex_standalone.py @@ -5,9 +5,12 @@ # Replacement with 'test_python_s2i_app_ex_standalone' class TestPythonExTemplate: - def setup_method(self): - self.oc_api = OpenShiftAPI(pod_name_prefix=f"python-{VARS.SHORT_VERSION}-test", version=VARS.VERSION, shared_cluster=True) + self.oc_api = OpenShiftAPI( + pod_name_prefix=f"python-{VARS.SHORT_VERSION}-test", + version=VARS.VERSION, + shared_cluster=True, + ) def teardown_method(self): self.oc_api.delete_project() @@ -15,11 +18,13 @@ def teardown_method(self): def test_python_ex_template_inside_cluster(self): service_name = f"python-{VARS.SHORT_VERSION}-test" assert self.oc_api.deploy_s2i_app( - image_name=VARS.IMAGE_NAME, app="https://github.com/sclorg/s2i-python-container.git", + image_name=VARS.IMAGE_NAME, + app="https://github.com/sclorg/s2i-python-container.git", context="examples/standalone-test-app", - service_name=service_name + service_name=service_name, ) assert self.oc_api.is_template_deployed(name_in_template=service_name) assert self.oc_api.check_response_inside_cluster( - name_in_template=service_name, expected_output="Hello World from standalone WSGI application!" + name_in_template=service_name, + expected_output="Hello World from standalone WSGI application!", ) diff --git a/test/test_python_ex_template.py b/test/test_ocp_python_ex_template.py similarity index 52% rename from test/test_python_ex_template.py rename to test/test_ocp_python_ex_template.py index f49f8df0..fe557ce9 100644 --- a/test/test_python_ex_template.py +++ b/test/test_ocp_python_ex_template.py @@ -1,18 +1,16 @@ -from packaging.version import Version - from container_ci_suite.openshift import OpenShiftAPI from conftest import VARS -BRANCH_TO_TEST = "2.2.x" -if Version(VARS.VERSION_NO_MINIMAL) >= Version("3.11"): - BRANCH_TO_TEST = "4.2.x" # Replacement with 'test_python_s2i_app_ex' class TestPythonExTemplate: - def setup_method(self): - self.oc_api = OpenShiftAPI(pod_name_prefix=f"python-{VARS.SHORT_VERSION}-test", version=VARS.VERSION_NO_MINIMAL, shared_cluster=True) + self.oc_api = OpenShiftAPI( + pod_name_prefix=f"python-{VARS.SHORT_VERSION}-test", + version=VARS.VERSION_NO_MINIMAL, + shared_cluster=True, + ) def teardown_method(self): self.oc_api.delete_project() @@ -20,11 +18,13 @@ def teardown_method(self): def test_python_ex_template_inside_cluster(self): service_name = f"python-{VARS.SHORT_VERSION}-test" assert self.oc_api.deploy_s2i_app( - image_name=VARS.IMAGE_NAME, app=f"https://github.com/sclorg/django-ex.git#{BRANCH_TO_TEST}", + image_name=VARS.IMAGE_NAME, + app=f"https://github.com/sclorg/django-ex.git#{VARS.BRANCH_TO_TEST}", context=".", - service_name=service_name + service_name=service_name, ) assert self.oc_api.is_template_deployed(name_in_template=service_name) assert self.oc_api.check_response_inside_cluster( - name_in_template=service_name, expected_output="Welcome to your Django application on OpenShift" + name_in_template=service_name, + expected_output="Welcome to your Django application on OpenShift", ) From 5f440ef5f16efe12d9e59f6c0978175f1f5179d6 Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Tue, 11 Nov 2025 15:41:51 +0100 Subject: [PATCH 2/4] Introduce PyTest suite migrated from `test/run` bash suite. Migration matrix is: `build_s2i_app` is fixture that takes `Path` test-app from `conftest.py` file. test_container_application.py tests all test-app directories. test_container_basics.py tests only basics w/o application. It also tests test_dockerfile and test_minimal_dockerfile Signed-off-by: Petr "Stone" Hracek --- manifest-minimal.yml | 38 +++++--- manifest.yml | 38 +++++--- test/conftest.py | 94 ++++++++++++++++-- test/run-openshift-pytest | 2 +- test/run-pytest | 15 +++ test/test_container_application.py | 81 ++++++++++++++++ test/test_container_basics.py | 148 +++++++++++++++++++++++++++++ 7 files changed, 378 insertions(+), 38 deletions(-) create mode 100755 test/run-pytest create mode 100644 test/test_container_application.py create mode 100644 test/test_container_basics.py diff --git a/manifest-minimal.yml b/manifest-minimal.yml index 2a351adb..59731322 100644 --- a/manifest-minimal.yml +++ b/manifest-minimal.yml @@ -20,6 +20,10 @@ DISTGEN_RULES: dest: test/run mode: "0755" + - src: test/run-pytest + dest: test/run-pytest + mode: "0755" + - src: src/test/pipenv-test-app/Pipfile dest: test/pipenv-test-app/Pipfile @@ -184,26 +188,32 @@ SYMLINK_RULES: - src: ../../test/run-openshift-pytest dest: test/run-openshift-pytest - - src: ../../test/test_deploy_templates.py - dest: test/test_deploy_templates.py + - src: ../../test/test_container_application.py + dest: test/test_container_application.py + + - src: ../../test/test_container_basics.py + dest: test/test_container_basics.py + + - src: ../../test/test_ocp_deploy_templates.py + dest: test/test_ocp_deploy_templates.py - - src: ../../test/test_imagestreams_quickstart.py - dest: test/test_imagestreams_quickstart.py + - src: ../../test/test_ocp_imagestreams_quickstart.py + dest: test/test_ocp_imagestreams_quickstart.py - - src: ../../test/test_python_ex_standalone.py - dest: test/test_python_ex_standalone.py + - src: ../../test/test_ocp_python_ex_standalone.py + dest: test/test_ocp_python_ex_standalone.py - - src: ../../test/test_python_ex_template.py - dest: test/test_python_ex_template.py + - src: ../../test/test_ocp_python_ex_template.py + dest: test/test_ocp_python_ex_template.py - - src: ../../test/test_helm_python_django_app.py - dest: test/test_helm_python_django_app.py + - src: ../../test/test_ocp_helm_python_django_app.py + dest: test/test_ocp_helm_python_django_app.py - - src: ../../test/test_helm_python_django_psql_persistent.py - dest: test/test_helm_python_django_psql_persistent.py + - src: ../../test/test_ocp_helm_python_django_psql_persistent.py + dest: test/test_ocp_helm_python_django_psql_persistent.py - - src: ../../test/test_helm_python_imagestreams.py - dest: test/test_helm_python_imagestreams.py + - src: ../../test/test_ocp_helm_python_imagestreams.py + dest: test/test_ocp_helm_python_imagestreams.py - src: ../../test/conftest.py dest: test/conftest.py diff --git a/manifest.yml b/manifest.yml index 406a24b0..ac34cfec 100644 --- a/manifest.yml +++ b/manifest.yml @@ -20,6 +20,10 @@ DISTGEN_RULES: dest: test/run mode: "0755" + - src: test/run-pytest + dest: test/run-pytest + mode: "0755" + - src: src/test/pipenv-test-app/Pipfile dest: test/pipenv-test-app/Pipfile @@ -183,26 +187,32 @@ SYMLINK_RULES: - src: ../../test/run-openshift-pytest dest: test/run-openshift-pytest - - src: ../../test/test_deploy_templates.py - dest: test/test_deploy_templates.py + - src: ../../test/test_container_application.py + dest: test/test_container_application.py + + - src: ../../test/test_container_basics.py + dest: test/test_container_basics.py + + - src: ../../test/test_ocp_deploy_templates.py + dest: test/test_ocp_deploy_templates.py - - src: ../../test/test_imagestreams_quickstart.py - dest: test/test_imagestreams_quickstart.py + - src: ../../test/test_ocp_imagestreams_quickstart.py + dest: test/test_ocp_imagestreams_quickstart.py - - src: ../../test/test_python_ex_standalone.py - dest: test/test_python_ex_standalone.py + - src: ../../test/test_ocp_python_ex_standalone.py + dest: test/test_ocp_python_ex_standalone.py - - src: ../../test/test_python_ex_template.py - dest: test/test_python_ex_template.py + - src: ../../test/test_ocp_python_ex_template.py + dest: test/test_ocp_python_ex_template.py - - src: ../../test/test_helm_python_django_app.py - dest: test/test_helm_python_django_app.py + - src: ../../test/test_ocp_helm_python_django_app.py + dest: test/test_ocp_helm_python_django_app.py - - src: ../../test/test_helm_python_django_psql_persistent.py - dest: test/test_helm_python_django_psql_persistent.py + - src: ../../test/test_ocp_helm_python_django_psql_persistent.py + dest: test/test_ocp_helm_python_django_psql_persistent.py - - src: ../../test/test_helm_python_imagestreams.py - dest: test/test_helm_python_imagestreams.py + - src: ../../test/test_ocp_helm_python_imagestreams.py + dest: test/test_ocp_helm_python_imagestreams.py - src: ../../test/conftest.py dest: test/conftest.py diff --git a/test/conftest.py b/test/conftest.py index a6a01350..974dac4d 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -1,7 +1,7 @@ -from collections import namedtuple import os -from pathlib import Path import sys +from pathlib import Path +from collections import namedtuple from container_ci_suite.utils import check_variables from pytest import skip @@ -15,12 +15,81 @@ "rhel10": "-ubi10", } -Vars = namedtuple("Vars", [ - "OS", "VERSION", "IMAGE_NAME", "IS_MINIMAL", "VERSION_NO_MINIMAL", - "SHORT_VERSION", "TAG", "TEST_DIR" - ]) + +Vars = namedtuple( + "Vars", + [ + "OS", + "VERSION", + "IMAGE_NAME", + "IS_MINIMAL", + "VERSION_NO_MINIMAL", + "SHORT_VERSION", + "TAG", + "TEST_DIR", + "WEB_APPS", + "SHOULD_FAIL_WEB_APPS", + "BRANCH_TO_TEST", + "DEPLOYED_PSQL_IMAGE", + "IMAGE_TAG", + "PSQL_VERSION", + ], +) VERSION = os.getenv("VERSION") OS = os.getenv("TARGET").lower() +TEST_DIR = Path(__file__).parent.absolute() +BRANCH_TO_TEST = "2.2.x" +DEPLOYED_PSQL_IMAGE = "quay.io/sclorg/postgresql-10-c8s:c8s" +IMAGE_TAG = "postgresql:10" +PSQL_VERSION = "10" +if VERSION in ("3.11", "3.12", "3.12-minimal"): + BRANCH_TO_TEST = "4.2.x" + DEPLOYED_PSQL_IMAGE = "quay.io/sclorg/postgresql-12-c8s" + IMAGE_TAG = "postgresql:12" + PSQL_VERSION = "12" + +COMMON_WEB_APPS = [ + TEST_DIR / f"{x}-test-app" + for x in [ + "gunicorn-config-different-port", + "gunicorn-different-port", + "django-different-port", + "standalone", + "setup", + "setup-requirements", + "django", + "numpy", + "app-home", + "locale", + "pipenv", + "app-module", + "pyuwsgi-pipenv", + "micropipenv", + "standalone-custom-pypi-index", + "gunicorn-python-configfile-different-port", + ] +] +FULL_WEB_APPS = [ + TEST_DIR / f"{x}-test-app" + for x in [ + "setup-cfg", + "npm-virtualenv-uwsgi", + "mod-wsgi", + "pin-pipenv-version", + "micropipenv-requirements", + "poetry-src-layout", + ] +] +SHOULD_FAIL_WEB_APPS = [ + TEST_DIR / "pipenv-and-micropipenv-should-fail-test-app", +] + +MINIMAL_WEB_APPS: list[Path] = [] +if "minimal" in VERSION: + WEB_APPS = COMMON_WEB_APPS +else: + WEB_APPS = COMMON_WEB_APPS + FULL_WEB_APPS + VARS = Vars( OS=OS, VERSION=VERSION, @@ -29,11 +98,18 @@ VERSION_NO_MINIMAL=VERSION.replace("-minimal", ""), SHORT_VERSION=VERSION.replace("-minimal", "").replace(".", ""), TAG=TAGS.get(OS), - TEST_DIR=Path(__file__).parent.absolute() + TEST_DIR=TEST_DIR, + WEB_APPS=WEB_APPS, + SHOULD_FAIL_WEB_APPS=SHOULD_FAIL_WEB_APPS, + BRANCH_TO_TEST=BRANCH_TO_TEST, + DEPLOYED_PSQL_IMAGE=DEPLOYED_PSQL_IMAGE, + IMAGE_TAG=IMAGE_TAG, + PSQL_VERSION=PSQL_VERSION, ) def skip_helm_charts_tests(): - if VARS.VERSION in ("3.9-minimal", "3.11-minimal") or \ - (VARS.VERSION == "3.12-minimal" and VARS.OS == "rhel8"): + if VARS.VERSION in ("3.9-minimal", "3.11-minimal") or ( + VARS.VERSION == "3.12-minimal" and VARS.OS == "rhel8" + ): skip(f"Skipping Helm Charts tests for {VARS.VERSION} on {VARS.OS}.") diff --git a/test/run-openshift-pytest b/test/run-openshift-pytest index 08979b78..3687c0e5 100755 --- a/test/run-openshift-pytest +++ b/test/run-openshift-pytest @@ -8,4 +8,4 @@ THISDIR=$(dirname ${BASH_SOURCE[0]}) -cd "${THISDIR}" && python3.12 -m pytest -s -rA --showlocals -vv test_*.py +cd "${THISDIR}" && python3.12 -m pytest -s -rA --showlocals -vv test_ocp_*.py diff --git a/test/run-pytest b/test/run-pytest new file mode 100755 index 00000000..be66d5a5 --- /dev/null +++ b/test/run-pytest @@ -0,0 +1,15 @@ +#!/bin/bash +# +# IMAGE_NAME specifies a name of the candidate image used for testing. +# The image has to be available before this script is executed. +# SINGLE_VERSION specifies the major version of the MariaDB in format of X.Y +# OS specifies RHEL version (e.g. OS=rhel8) +# + +THISDIR=$(dirname ${BASH_SOURCE[0]}) + +PYTHON_VERSION="3.12" +if [[ ! -f "/usr/bin/python$PYTHON_VERSION" ]]; then + PYTHON_VERSION="3.13" +fi +cd "${THISDIR}" && "python${PYTHON_VERSION}" -m pytest -s -rA --showlocals -vv test_container_b*.py diff --git a/test/test_container_application.py b/test/test_container_application.py new file mode 100644 index 00000000..ef586ea6 --- /dev/null +++ b/test/test_container_application.py @@ -0,0 +1,81 @@ +import pytest + +from container_ci_suite.container_lib import ContainerImage, ContainerTestLib +from container_ci_suite.engines.podman_wrapper import PodmanCLIWrapper + +from conftest import VARS + + +@pytest.fixture(params=VARS.WEB_APPS, ids=[app.name for app in VARS.WEB_APPS]) +def build_s2i_app(request) -> ContainerTestLib: + """ + Build a S2I application. + """ + container_lib = ContainerTestLib(VARS.IMAGE_NAME) + app_name = request.param.name + s2i_app = container_lib.build_as_df( + app_path=request.param, + s2i_args="--pull-policy=never", + src_image=VARS.IMAGE_NAME, + dst_image=f"{VARS.IMAGE_NAME}-{app_name}", + ) + yield s2i_app + s2i_app.cleanup() + + +@pytest.mark.usefixtures("build_s2i_app") +@pytest.mark.parametrize( + "container_args", + [ + "--user 100001", + "--user 12345", + "-e ENABLE_INIT_WRAPPER=true", + ], +) +def test_application(build_s2i_app, container_args): + """ + Test if container works + Python version is properly set + Application response on specific port and specific URL. + + """ + s2i_app = build_s2i_app + cid_file_name = s2i_app.app_name + assert s2i_app.create_container( + cid_file_name=cid_file_name, + container_args=container_args, + ) + assert ContainerImage.wait_for_cid(cid_file_name=cid_file_name) + python_version = PodmanCLIWrapper.podman_run_command_and_remove( + cid_file_name=VARS.IMAGE_NAME, cmd="echo \\$PYTHON_VERSION" + ).strip() + python_version_output = PodmanCLIWrapper.podman_run_command_and_remove( + cid_file_name=VARS.IMAGE_NAME, cmd="python --version" + ) + assert f"Python {python_version}." in python_version_output + cip = s2i_app.get_cip(cid_file_name=cid_file_name) + assert cip + port = 8080 + if "different-port" in s2i_app.app_name: + port = 8085 + assert s2i_app.test_response(url=f"http://{cip}", port=port) + + +@pytest.mark.parametrize( + "should_fail_app", + VARS.SHOULD_FAIL_WEB_APPS, +) +def test_application_should_fail(should_fail_app): + """ + Test if build fails for should fail apps + + """ + container_lib = ContainerTestLib(VARS.IMAGE_NAME) + app_name = should_fail_app.name + s2i_app_should_fail = container_lib.build_as_df( + app_path=should_fail_app, + s2i_args="--pull-policy=never", + src_image=VARS.IMAGE_NAME, + dst_image=f"{VARS.IMAGE_NAME}-{app_name}", + ) + assert not s2i_app_should_fail diff --git a/test/test_container_basics.py b/test/test_container_basics.py new file mode 100644 index 00000000..a2160e4b --- /dev/null +++ b/test/test_container_basics.py @@ -0,0 +1,148 @@ +import re + +import pytest + +from container_ci_suite.container_lib import ContainerTestLib +from container_ci_suite.engines.podman_wrapper import PodmanCLIWrapper +from container_ci_suite.utils import ContainerTestLibUtils + +from conftest import VARS + + +class TestS2IPythonContainer: + """ + Test if container works properly + """ + + def setup_method(self): + """ + Setup the test environment. + """ + self.app = ContainerTestLib() + + def teardown_method(self): + """ + Cleanup the test environment. + """ + self.app.cleanup() + + def test_run_s2i_usage(self): + """ + Test if s2i usage works + """ + assert self.app.s2i_usage() + + def test_docker_run_usage(self): + """ + Test if container is runnable + """ + assert ( + PodmanCLIWrapper.call_podman_command( + cmd=f"run --rm {VARS.IMAGE_NAME} &>/dev/null", return_output=False + ) + == 0 + ) + + def test_scl_usage(self): + """ + Test if python --version returns proper output + """ + python_version = PodmanCLIWrapper.podman_run_command_and_remove( + cid_file_name=VARS.IMAGE_NAME, cmd="echo \\$PYTHON_VERSION" + ).strip() + python_version_output = PodmanCLIWrapper.podman_run_command_and_remove( + cid_file_name=VARS.IMAGE_NAME, cmd="python --version" + ) + assert f"Python {python_version}." in python_version_output + if not VARS.IS_MINIMAL: + assert ( + re.search( + r"v[0-9]*\.[0-9]*\.[0-9]*", + PodmanCLIWrapper.podman_run_command_and_remove( + cid_file_name=VARS.IMAGE_NAME, cmd="node --version" + ), + ) + is not None + ) + assert ( + re.search( + r"^[0-9]*\.[0-9]*\.[0-9]*", + PodmanCLIWrapper.podman_run_command_and_remove( + cid_file_name=VARS.IMAGE_NAME, cmd="npm --version" + ), + ) + is not None + ) + + @pytest.mark.parametrize("dockerfile", ["Dockerfile.tpl", "Dockerfile_no_s2i.tpl"]) + def test_dockerfiles(self, dockerfile): + if "minimal" in VARS.VERSION: + pytest.skip("Skipping tests 'test_dockerfiles' for minimal versions.") + app_url = f"https://github.com/sclorg/django-ex.git@{VARS.BRANCH_TO_TEST}" + assert self.app.build_test_container( + dockerfile=VARS.TEST_DIR / "from-dockerfile" / dockerfile, + app_url=app_url, + app_dir="app-src", + ) + assert self.app.test_app_dockerfile() + cip = self.app.get_cip() + assert cip + assert self.app.test_response( + url=cip, expected_output="Welcome to your Django application on OpenShift" + ) + + def test_minimal_dockerfiles(self): + if "minimal" not in VARS.VERSION: + pytest.skip( + "Skipping tests 'test_minimal_dockerfiles' for non-minimal versions." + ) + # The following tests are for multi-stage builds. These technically also work on full images, but there is no reason to do multi-stage builds with full images. + assert self.app.build_test_container( + dockerfile=VARS.TEST_DIR / "from-dockerfile/uwsgi.Dockerfile.tpl", + app_url=VARS.TEST_DIR / "uwsgi-test-app", + app_dir="app-src", + app_image_name="uwsgi-test-app", + ) + assert self.app.test_app_dockerfile() + cip = self.app.get_cip(cid_file_name="uwsgi-test-app") + assert cip + assert self.app.test_response( + url=cip, + expected_output="Hello World from uWSGI hosted WSGI application!", + ) + + # So far, for all the minimal images, the name of the full container image counterpart + # is the same just without -minimal infix. + # sclorg/python-39-minimal-c9s / sclorg/python-39-c9s + # ubi8/python-39-minimal / ubi8/python-39 + full_image_name = VARS.IMAGE_NAME.replace("-minimal", "") + is_pulled = PodmanCLIWrapper.podman_pull_image(image_name=full_image_name) + if not is_pulled: + assert pytest.skip( + f"[SKIP] Multistage build from Dockerfile - '{full_image_name}' does not exists." + ) + + dockerfile_image_name = ContainerTestLibUtils.update_dockerfile( + dockerfile=VARS.TEST_DIR / "from-dockerfile/mod_wsgi.Dockerfile.tpl", + original_string="#IMAGE_NAME#", + string_to_replace=VARS.IMAGE_NAME, + ) + dockerfile = ContainerTestLibUtils.update_dockerfile( + dockerfile=dockerfile_image_name, + original_string="#FULL_IMAGE_NAME#", + string_to_replace=full_image_name, + ) + assert self.app.build_test_container( + dockerfile=dockerfile, + app_url=VARS.TEST_DIR / "micropipenv-requirements-test-app", + app_dir="app-src", + app_image_name="micropipenv-requirements-test-app", + ) + assert self.app.test_app_dockerfile() + cip = self.app.get_cip(cid_file_name="micropipenv-requirements-test-app") + assert cip + assert self.app.test_response( + url=cip, + expected_output="Hello World from mod_wsgi hosted WSGI application!", + debug=True, + ) From cf7da902754b7c34ea49bee8262d03fb5a0524b1 Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Tue, 11 Nov 2025 15:47:55 +0100 Subject: [PATCH 3/4] Add dist-gen generated files Signed-off-by: Petr "Stone" Hracek --- 3.11-minimal/test/run-pytest | 15 +++++++++++++++ 3.11-minimal/test/test_container_application.py | 1 + 3.11-minimal/test/test_container_basics.py | 1 + 3.11-minimal/test/test_deploy_templates.py | 1 - 3.11-minimal/test/test_helm_python_django_app.py | 1 - .../test_helm_python_django_psql_persistent.py | 1 - .../test/test_helm_python_imagestreams.py | 1 - 3.11-minimal/test/test_imagestreams_quickstart.py | 1 - 3.11-minimal/test/test_ocp_deploy_templates.py | 1 + .../test/test_ocp_helm_python_django_app.py | 1 + ...test_ocp_helm_python_django_psql_persistent.py | 1 + .../test/test_ocp_helm_python_imagestreams.py | 1 + .../test/test_ocp_imagestreams_quickstart.py | 1 + .../test/test_ocp_python_ex_standalone.py | 1 + 3.11-minimal/test/test_ocp_python_ex_template.py | 1 + 3.11-minimal/test/test_python_ex_standalone.py | 1 - 3.11-minimal/test/test_python_ex_template.py | 1 - 3.11/test/run-pytest | 15 +++++++++++++++ 3.11/test/test_container_application.py | 1 + 3.11/test/test_container_basics.py | 1 + 3.11/test/test_deploy_templates.py | 1 - 3.11/test/test_helm_python_django_app.py | 1 - .../test_helm_python_django_psql_persistent.py | 1 - 3.11/test/test_helm_python_imagestreams.py | 1 - 3.11/test/test_imagestreams_quickstart.py | 1 - 3.11/test/test_ocp_deploy_templates.py | 1 + 3.11/test/test_ocp_helm_python_django_app.py | 1 + ...test_ocp_helm_python_django_psql_persistent.py | 1 + 3.11/test/test_ocp_helm_python_imagestreams.py | 1 + 3.11/test/test_ocp_imagestreams_quickstart.py | 1 + 3.11/test/test_ocp_python_ex_standalone.py | 1 + 3.11/test/test_ocp_python_ex_template.py | 1 + 3.11/test/test_python_ex_standalone.py | 1 - 3.11/test/test_python_ex_template.py | 1 - 3.12-minimal/test/run-pytest | 15 +++++++++++++++ 3.12-minimal/test/test_container_application.py | 1 + 3.12-minimal/test/test_container_basics.py | 1 + 3.12-minimal/test/test_deploy_templates.py | 1 - 3.12-minimal/test/test_helm_python_django_app.py | 1 - .../test_helm_python_django_psql_persistent.py | 1 - .../test/test_helm_python_imagestreams.py | 1 - 3.12-minimal/test/test_imagestreams_quickstart.py | 1 - 3.12-minimal/test/test_ocp_deploy_templates.py | 1 + .../test/test_ocp_helm_python_django_app.py | 1 + ...test_ocp_helm_python_django_psql_persistent.py | 1 + .../test/test_ocp_helm_python_imagestreams.py | 1 + .../test/test_ocp_imagestreams_quickstart.py | 1 + .../test/test_ocp_python_ex_standalone.py | 1 + 3.12-minimal/test/test_ocp_python_ex_template.py | 1 + 3.12-minimal/test/test_python_ex_standalone.py | 1 - 3.12-minimal/test/test_python_ex_template.py | 1 - 3.12/test/run-pytest | 15 +++++++++++++++ 3.12/test/test_container_application.py | 1 + 3.12/test/test_container_basics.py | 1 + 3.12/test/test_deploy_templates.py | 1 - 3.12/test/test_helm_python_django_app.py | 1 - .../test_helm_python_django_psql_persistent.py | 1 - 3.12/test/test_helm_python_imagestreams.py | 1 - 3.12/test/test_imagestreams_quickstart.py | 1 - 3.12/test/test_ocp_deploy_templates.py | 1 + 3.12/test/test_ocp_helm_python_django_app.py | 1 + ...test_ocp_helm_python_django_psql_persistent.py | 1 + 3.12/test/test_ocp_helm_python_imagestreams.py | 1 + 3.12/test/test_ocp_imagestreams_quickstart.py | 1 + 3.12/test/test_ocp_python_ex_standalone.py | 1 + 3.12/test/test_ocp_python_ex_template.py | 1 + 3.12/test/test_python_ex_standalone.py | 1 - 3.12/test/test_python_ex_template.py | 1 - 3.13-minimal/test/run-pytest | 15 +++++++++++++++ 3.13-minimal/test/test_container_application.py | 1 + 3.13-minimal/test/test_container_basics.py | 1 + 3.13-minimal/test/test_deploy_templates.py | 1 - 3.13-minimal/test/test_helm_python_django_app.py | 1 - .../test_helm_python_django_psql_persistent.py | 1 - .../test/test_helm_python_imagestreams.py | 1 - 3.13-minimal/test/test_imagestreams_quickstart.py | 1 - 3.13-minimal/test/test_ocp_deploy_templates.py | 1 + .../test/test_ocp_helm_python_django_app.py | 1 + ...test_ocp_helm_python_django_psql_persistent.py | 1 + .../test/test_ocp_helm_python_imagestreams.py | 1 + .../test/test_ocp_imagestreams_quickstart.py | 1 + .../test/test_ocp_python_ex_standalone.py | 1 + 3.13-minimal/test/test_ocp_python_ex_template.py | 1 + 3.13-minimal/test/test_python_ex_standalone.py | 1 - 3.13-minimal/test/test_python_ex_template.py | 1 - 3.13/test/run-pytest | 15 +++++++++++++++ 3.13/test/test_container_application.py | 1 + 3.13/test/test_container_basics.py | 1 + 3.13/test/test_deploy_templates.py | 1 - 3.13/test/test_helm_python_django_app.py | 1 - .../test_helm_python_django_psql_persistent.py | 1 - 3.13/test/test_helm_python_imagestreams.py | 1 - 3.13/test/test_imagestreams_quickstart.py | 1 - 3.13/test/test_ocp_deploy_templates.py | 1 + 3.13/test/test_ocp_helm_python_django_app.py | 1 + ...test_ocp_helm_python_django_psql_persistent.py | 1 + 3.13/test/test_ocp_helm_python_imagestreams.py | 1 + 3.13/test/test_ocp_imagestreams_quickstart.py | 1 + 3.13/test/test_ocp_python_ex_standalone.py | 1 + 3.13/test/test_ocp_python_ex_template.py | 1 + 3.13/test/test_python_ex_standalone.py | 1 - 3.13/test/test_python_ex_template.py | 1 - 3.6/test/run-pytest | 15 +++++++++++++++ 3.6/test/test_container_application.py | 1 + 3.6/test/test_container_basics.py | 1 + 3.6/test/test_deploy_templates.py | 1 - 3.6/test/test_helm_python_django_app.py | 1 - .../test_helm_python_django_psql_persistent.py | 1 - 3.6/test/test_helm_python_imagestreams.py | 1 - 3.6/test/test_imagestreams_quickstart.py | 1 - 3.6/test/test_ocp_deploy_templates.py | 1 + 3.6/test/test_ocp_helm_python_django_app.py | 1 + ...test_ocp_helm_python_django_psql_persistent.py | 1 + 3.6/test/test_ocp_helm_python_imagestreams.py | 1 + 3.6/test/test_ocp_imagestreams_quickstart.py | 1 + 3.6/test/test_ocp_python_ex_standalone.py | 1 + 3.6/test/test_ocp_python_ex_template.py | 1 + 3.6/test/test_python_ex_standalone.py | 1 - 3.6/test/test_python_ex_template.py | 1 - 3.9-minimal/test/run-pytest | 15 +++++++++++++++ 3.9-minimal/test/test_container_application.py | 1 + 3.9-minimal/test/test_container_basics.py | 1 + 3.9-minimal/test/test_deploy_templates.py | 1 - 3.9-minimal/test/test_helm_python_django_app.py | 1 - .../test_helm_python_django_psql_persistent.py | 1 - 3.9-minimal/test/test_helm_python_imagestreams.py | 1 - 3.9-minimal/test/test_imagestreams_quickstart.py | 1 - 3.9-minimal/test/test_ocp_deploy_templates.py | 1 + .../test/test_ocp_helm_python_django_app.py | 1 + ...test_ocp_helm_python_django_psql_persistent.py | 1 + .../test/test_ocp_helm_python_imagestreams.py | 1 + .../test/test_ocp_imagestreams_quickstart.py | 1 + 3.9-minimal/test/test_ocp_python_ex_standalone.py | 1 + 3.9-minimal/test/test_ocp_python_ex_template.py | 1 + 3.9-minimal/test/test_python_ex_standalone.py | 1 - 3.9-minimal/test/test_python_ex_template.py | 1 - 3.9/test/run-pytest | 15 +++++++++++++++ 3.9/test/test_container_application.py | 1 + 3.9/test/test_container_basics.py | 1 + 3.9/test/test_deploy_templates.py | 1 - 3.9/test/test_helm_python_django_app.py | 1 - .../test_helm_python_django_psql_persistent.py | 1 - 3.9/test/test_helm_python_imagestreams.py | 1 - 3.9/test/test_imagestreams_quickstart.py | 1 - 3.9/test/test_ocp_deploy_templates.py | 1 + 3.9/test/test_ocp_helm_python_django_app.py | 1 + ...test_ocp_helm_python_django_psql_persistent.py | 1 + 3.9/test/test_ocp_helm_python_imagestreams.py | 1 + 3.9/test/test_ocp_imagestreams_quickstart.py | 1 + 3.9/test/test_ocp_python_ex_standalone.py | 1 + 3.9/test/test_ocp_python_ex_template.py | 1 + 3.9/test/test_python_ex_standalone.py | 1 - 3.9/test/test_python_ex_template.py | 1 - 153 files changed, 216 insertions(+), 63 deletions(-) create mode 100755 3.11-minimal/test/run-pytest create mode 120000 3.11-minimal/test/test_container_application.py create mode 120000 3.11-minimal/test/test_container_basics.py delete mode 120000 3.11-minimal/test/test_deploy_templates.py delete mode 120000 3.11-minimal/test/test_helm_python_django_app.py delete mode 120000 3.11-minimal/test/test_helm_python_django_psql_persistent.py delete mode 120000 3.11-minimal/test/test_helm_python_imagestreams.py delete mode 120000 3.11-minimal/test/test_imagestreams_quickstart.py create mode 120000 3.11-minimal/test/test_ocp_deploy_templates.py create mode 120000 3.11-minimal/test/test_ocp_helm_python_django_app.py create mode 120000 3.11-minimal/test/test_ocp_helm_python_django_psql_persistent.py create mode 120000 3.11-minimal/test/test_ocp_helm_python_imagestreams.py create mode 120000 3.11-minimal/test/test_ocp_imagestreams_quickstart.py create mode 120000 3.11-minimal/test/test_ocp_python_ex_standalone.py create mode 120000 3.11-minimal/test/test_ocp_python_ex_template.py delete mode 120000 3.11-minimal/test/test_python_ex_standalone.py delete mode 120000 3.11-minimal/test/test_python_ex_template.py create mode 100755 3.11/test/run-pytest create mode 120000 3.11/test/test_container_application.py create mode 120000 3.11/test/test_container_basics.py delete mode 120000 3.11/test/test_deploy_templates.py delete mode 120000 3.11/test/test_helm_python_django_app.py delete mode 120000 3.11/test/test_helm_python_django_psql_persistent.py delete mode 120000 3.11/test/test_helm_python_imagestreams.py delete mode 120000 3.11/test/test_imagestreams_quickstart.py create mode 120000 3.11/test/test_ocp_deploy_templates.py create mode 120000 3.11/test/test_ocp_helm_python_django_app.py create mode 120000 3.11/test/test_ocp_helm_python_django_psql_persistent.py create mode 120000 3.11/test/test_ocp_helm_python_imagestreams.py create mode 120000 3.11/test/test_ocp_imagestreams_quickstart.py create mode 120000 3.11/test/test_ocp_python_ex_standalone.py create mode 120000 3.11/test/test_ocp_python_ex_template.py delete mode 120000 3.11/test/test_python_ex_standalone.py delete mode 120000 3.11/test/test_python_ex_template.py create mode 100755 3.12-minimal/test/run-pytest create mode 120000 3.12-minimal/test/test_container_application.py create mode 120000 3.12-minimal/test/test_container_basics.py delete mode 120000 3.12-minimal/test/test_deploy_templates.py delete mode 120000 3.12-minimal/test/test_helm_python_django_app.py delete mode 120000 3.12-minimal/test/test_helm_python_django_psql_persistent.py delete mode 120000 3.12-minimal/test/test_helm_python_imagestreams.py delete mode 120000 3.12-minimal/test/test_imagestreams_quickstart.py create mode 120000 3.12-minimal/test/test_ocp_deploy_templates.py create mode 120000 3.12-minimal/test/test_ocp_helm_python_django_app.py create mode 120000 3.12-minimal/test/test_ocp_helm_python_django_psql_persistent.py create mode 120000 3.12-minimal/test/test_ocp_helm_python_imagestreams.py create mode 120000 3.12-minimal/test/test_ocp_imagestreams_quickstart.py create mode 120000 3.12-minimal/test/test_ocp_python_ex_standalone.py create mode 120000 3.12-minimal/test/test_ocp_python_ex_template.py delete mode 120000 3.12-minimal/test/test_python_ex_standalone.py delete mode 120000 3.12-minimal/test/test_python_ex_template.py create mode 100755 3.12/test/run-pytest create mode 120000 3.12/test/test_container_application.py create mode 120000 3.12/test/test_container_basics.py delete mode 120000 3.12/test/test_deploy_templates.py delete mode 120000 3.12/test/test_helm_python_django_app.py delete mode 120000 3.12/test/test_helm_python_django_psql_persistent.py delete mode 120000 3.12/test/test_helm_python_imagestreams.py delete mode 120000 3.12/test/test_imagestreams_quickstart.py create mode 120000 3.12/test/test_ocp_deploy_templates.py create mode 120000 3.12/test/test_ocp_helm_python_django_app.py create mode 120000 3.12/test/test_ocp_helm_python_django_psql_persistent.py create mode 120000 3.12/test/test_ocp_helm_python_imagestreams.py create mode 120000 3.12/test/test_ocp_imagestreams_quickstart.py create mode 120000 3.12/test/test_ocp_python_ex_standalone.py create mode 120000 3.12/test/test_ocp_python_ex_template.py delete mode 120000 3.12/test/test_python_ex_standalone.py delete mode 120000 3.12/test/test_python_ex_template.py create mode 100755 3.13-minimal/test/run-pytest create mode 120000 3.13-minimal/test/test_container_application.py create mode 120000 3.13-minimal/test/test_container_basics.py delete mode 120000 3.13-minimal/test/test_deploy_templates.py delete mode 120000 3.13-minimal/test/test_helm_python_django_app.py delete mode 120000 3.13-minimal/test/test_helm_python_django_psql_persistent.py delete mode 120000 3.13-minimal/test/test_helm_python_imagestreams.py delete mode 120000 3.13-minimal/test/test_imagestreams_quickstart.py create mode 120000 3.13-minimal/test/test_ocp_deploy_templates.py create mode 120000 3.13-minimal/test/test_ocp_helm_python_django_app.py create mode 120000 3.13-minimal/test/test_ocp_helm_python_django_psql_persistent.py create mode 120000 3.13-minimal/test/test_ocp_helm_python_imagestreams.py create mode 120000 3.13-minimal/test/test_ocp_imagestreams_quickstart.py create mode 120000 3.13-minimal/test/test_ocp_python_ex_standalone.py create mode 120000 3.13-minimal/test/test_ocp_python_ex_template.py delete mode 120000 3.13-minimal/test/test_python_ex_standalone.py delete mode 120000 3.13-minimal/test/test_python_ex_template.py create mode 100755 3.13/test/run-pytest create mode 120000 3.13/test/test_container_application.py create mode 120000 3.13/test/test_container_basics.py delete mode 120000 3.13/test/test_deploy_templates.py delete mode 120000 3.13/test/test_helm_python_django_app.py delete mode 120000 3.13/test/test_helm_python_django_psql_persistent.py delete mode 120000 3.13/test/test_helm_python_imagestreams.py delete mode 120000 3.13/test/test_imagestreams_quickstart.py create mode 120000 3.13/test/test_ocp_deploy_templates.py create mode 120000 3.13/test/test_ocp_helm_python_django_app.py create mode 120000 3.13/test/test_ocp_helm_python_django_psql_persistent.py create mode 120000 3.13/test/test_ocp_helm_python_imagestreams.py create mode 120000 3.13/test/test_ocp_imagestreams_quickstart.py create mode 120000 3.13/test/test_ocp_python_ex_standalone.py create mode 120000 3.13/test/test_ocp_python_ex_template.py delete mode 120000 3.13/test/test_python_ex_standalone.py delete mode 120000 3.13/test/test_python_ex_template.py create mode 100755 3.6/test/run-pytest create mode 120000 3.6/test/test_container_application.py create mode 120000 3.6/test/test_container_basics.py delete mode 120000 3.6/test/test_deploy_templates.py delete mode 120000 3.6/test/test_helm_python_django_app.py delete mode 120000 3.6/test/test_helm_python_django_psql_persistent.py delete mode 120000 3.6/test/test_helm_python_imagestreams.py delete mode 120000 3.6/test/test_imagestreams_quickstart.py create mode 120000 3.6/test/test_ocp_deploy_templates.py create mode 120000 3.6/test/test_ocp_helm_python_django_app.py create mode 120000 3.6/test/test_ocp_helm_python_django_psql_persistent.py create mode 120000 3.6/test/test_ocp_helm_python_imagestreams.py create mode 120000 3.6/test/test_ocp_imagestreams_quickstart.py create mode 120000 3.6/test/test_ocp_python_ex_standalone.py create mode 120000 3.6/test/test_ocp_python_ex_template.py delete mode 120000 3.6/test/test_python_ex_standalone.py delete mode 120000 3.6/test/test_python_ex_template.py create mode 100755 3.9-minimal/test/run-pytest create mode 120000 3.9-minimal/test/test_container_application.py create mode 120000 3.9-minimal/test/test_container_basics.py delete mode 120000 3.9-minimal/test/test_deploy_templates.py delete mode 120000 3.9-minimal/test/test_helm_python_django_app.py delete mode 120000 3.9-minimal/test/test_helm_python_django_psql_persistent.py delete mode 120000 3.9-minimal/test/test_helm_python_imagestreams.py delete mode 120000 3.9-minimal/test/test_imagestreams_quickstart.py create mode 120000 3.9-minimal/test/test_ocp_deploy_templates.py create mode 120000 3.9-minimal/test/test_ocp_helm_python_django_app.py create mode 120000 3.9-minimal/test/test_ocp_helm_python_django_psql_persistent.py create mode 120000 3.9-minimal/test/test_ocp_helm_python_imagestreams.py create mode 120000 3.9-minimal/test/test_ocp_imagestreams_quickstart.py create mode 120000 3.9-minimal/test/test_ocp_python_ex_standalone.py create mode 120000 3.9-minimal/test/test_ocp_python_ex_template.py delete mode 120000 3.9-minimal/test/test_python_ex_standalone.py delete mode 120000 3.9-minimal/test/test_python_ex_template.py create mode 100755 3.9/test/run-pytest create mode 120000 3.9/test/test_container_application.py create mode 120000 3.9/test/test_container_basics.py delete mode 120000 3.9/test/test_deploy_templates.py delete mode 120000 3.9/test/test_helm_python_django_app.py delete mode 120000 3.9/test/test_helm_python_django_psql_persistent.py delete mode 120000 3.9/test/test_helm_python_imagestreams.py delete mode 120000 3.9/test/test_imagestreams_quickstart.py create mode 120000 3.9/test/test_ocp_deploy_templates.py create mode 120000 3.9/test/test_ocp_helm_python_django_app.py create mode 120000 3.9/test/test_ocp_helm_python_django_psql_persistent.py create mode 120000 3.9/test/test_ocp_helm_python_imagestreams.py create mode 120000 3.9/test/test_ocp_imagestreams_quickstart.py create mode 120000 3.9/test/test_ocp_python_ex_standalone.py create mode 120000 3.9/test/test_ocp_python_ex_template.py delete mode 120000 3.9/test/test_python_ex_standalone.py delete mode 120000 3.9/test/test_python_ex_template.py diff --git a/3.11-minimal/test/run-pytest b/3.11-minimal/test/run-pytest new file mode 100755 index 00000000..be66d5a5 --- /dev/null +++ b/3.11-minimal/test/run-pytest @@ -0,0 +1,15 @@ +#!/bin/bash +# +# IMAGE_NAME specifies a name of the candidate image used for testing. +# The image has to be available before this script is executed. +# SINGLE_VERSION specifies the major version of the MariaDB in format of X.Y +# OS specifies RHEL version (e.g. OS=rhel8) +# + +THISDIR=$(dirname ${BASH_SOURCE[0]}) + +PYTHON_VERSION="3.12" +if [[ ! -f "/usr/bin/python$PYTHON_VERSION" ]]; then + PYTHON_VERSION="3.13" +fi +cd "${THISDIR}" && "python${PYTHON_VERSION}" -m pytest -s -rA --showlocals -vv test_container_b*.py diff --git a/3.11-minimal/test/test_container_application.py b/3.11-minimal/test/test_container_application.py new file mode 120000 index 00000000..25c1c1ec --- /dev/null +++ b/3.11-minimal/test/test_container_application.py @@ -0,0 +1 @@ +../../test/test_container_application.py \ No newline at end of file diff --git a/3.11-minimal/test/test_container_basics.py b/3.11-minimal/test/test_container_basics.py new file mode 120000 index 00000000..b85dc139 --- /dev/null +++ b/3.11-minimal/test/test_container_basics.py @@ -0,0 +1 @@ +../../test/test_container_basics.py \ No newline at end of file diff --git a/3.11-minimal/test/test_deploy_templates.py b/3.11-minimal/test/test_deploy_templates.py deleted file mode 120000 index 2b15b63f..00000000 --- a/3.11-minimal/test/test_deploy_templates.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_deploy_templates.py \ No newline at end of file diff --git a/3.11-minimal/test/test_helm_python_django_app.py b/3.11-minimal/test/test_helm_python_django_app.py deleted file mode 120000 index 46a601b1..00000000 --- a/3.11-minimal/test/test_helm_python_django_app.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_helm_python_django_app.py \ No newline at end of file diff --git a/3.11-minimal/test/test_helm_python_django_psql_persistent.py b/3.11-minimal/test/test_helm_python_django_psql_persistent.py deleted file mode 120000 index 0667c2f3..00000000 --- a/3.11-minimal/test/test_helm_python_django_psql_persistent.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_helm_python_django_psql_persistent.py \ No newline at end of file diff --git a/3.11-minimal/test/test_helm_python_imagestreams.py b/3.11-minimal/test/test_helm_python_imagestreams.py deleted file mode 120000 index 7be14462..00000000 --- a/3.11-minimal/test/test_helm_python_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_helm_python_imagestreams.py \ No newline at end of file diff --git a/3.11-minimal/test/test_imagestreams_quickstart.py b/3.11-minimal/test/test_imagestreams_quickstart.py deleted file mode 120000 index c238e8c7..00000000 --- a/3.11-minimal/test/test_imagestreams_quickstart.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_imagestreams_quickstart.py \ No newline at end of file diff --git a/3.11-minimal/test/test_ocp_deploy_templates.py b/3.11-minimal/test/test_ocp_deploy_templates.py new file mode 120000 index 00000000..0b821390 --- /dev/null +++ b/3.11-minimal/test/test_ocp_deploy_templates.py @@ -0,0 +1 @@ +../../test/test_ocp_deploy_templates.py \ No newline at end of file diff --git a/3.11-minimal/test/test_ocp_helm_python_django_app.py b/3.11-minimal/test/test_ocp_helm_python_django_app.py new file mode 120000 index 00000000..34b4f0dd --- /dev/null +++ b/3.11-minimal/test/test_ocp_helm_python_django_app.py @@ -0,0 +1 @@ +../../test/test_ocp_helm_python_django_app.py \ No newline at end of file diff --git a/3.11-minimal/test/test_ocp_helm_python_django_psql_persistent.py b/3.11-minimal/test/test_ocp_helm_python_django_psql_persistent.py new file mode 120000 index 00000000..64d2105d --- /dev/null +++ b/3.11-minimal/test/test_ocp_helm_python_django_psql_persistent.py @@ -0,0 +1 @@ +../../test/test_ocp_helm_python_django_psql_persistent.py \ No newline at end of file diff --git a/3.11-minimal/test/test_ocp_helm_python_imagestreams.py b/3.11-minimal/test/test_ocp_helm_python_imagestreams.py new file mode 120000 index 00000000..0022607f --- /dev/null +++ b/3.11-minimal/test/test_ocp_helm_python_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_helm_python_imagestreams.py \ No newline at end of file diff --git a/3.11-minimal/test/test_ocp_imagestreams_quickstart.py b/3.11-minimal/test/test_ocp_imagestreams_quickstart.py new file mode 120000 index 00000000..18f8d7e2 --- /dev/null +++ b/3.11-minimal/test/test_ocp_imagestreams_quickstart.py @@ -0,0 +1 @@ +../../test/test_ocp_imagestreams_quickstart.py \ No newline at end of file diff --git a/3.11-minimal/test/test_ocp_python_ex_standalone.py b/3.11-minimal/test/test_ocp_python_ex_standalone.py new file mode 120000 index 00000000..bb6022f7 --- /dev/null +++ b/3.11-minimal/test/test_ocp_python_ex_standalone.py @@ -0,0 +1 @@ +../../test/test_ocp_python_ex_standalone.py \ No newline at end of file diff --git a/3.11-minimal/test/test_ocp_python_ex_template.py b/3.11-minimal/test/test_ocp_python_ex_template.py new file mode 120000 index 00000000..b75080ca --- /dev/null +++ b/3.11-minimal/test/test_ocp_python_ex_template.py @@ -0,0 +1 @@ +../../test/test_ocp_python_ex_template.py \ No newline at end of file diff --git a/3.11-minimal/test/test_python_ex_standalone.py b/3.11-minimal/test/test_python_ex_standalone.py deleted file mode 120000 index 504a43a3..00000000 --- a/3.11-minimal/test/test_python_ex_standalone.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_python_ex_standalone.py \ No newline at end of file diff --git a/3.11-minimal/test/test_python_ex_template.py b/3.11-minimal/test/test_python_ex_template.py deleted file mode 120000 index 14f15e03..00000000 --- a/3.11-minimal/test/test_python_ex_template.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_python_ex_template.py \ No newline at end of file diff --git a/3.11/test/run-pytest b/3.11/test/run-pytest new file mode 100755 index 00000000..be66d5a5 --- /dev/null +++ b/3.11/test/run-pytest @@ -0,0 +1,15 @@ +#!/bin/bash +# +# IMAGE_NAME specifies a name of the candidate image used for testing. +# The image has to be available before this script is executed. +# SINGLE_VERSION specifies the major version of the MariaDB in format of X.Y +# OS specifies RHEL version (e.g. OS=rhel8) +# + +THISDIR=$(dirname ${BASH_SOURCE[0]}) + +PYTHON_VERSION="3.12" +if [[ ! -f "/usr/bin/python$PYTHON_VERSION" ]]; then + PYTHON_VERSION="3.13" +fi +cd "${THISDIR}" && "python${PYTHON_VERSION}" -m pytest -s -rA --showlocals -vv test_container_b*.py diff --git a/3.11/test/test_container_application.py b/3.11/test/test_container_application.py new file mode 120000 index 00000000..25c1c1ec --- /dev/null +++ b/3.11/test/test_container_application.py @@ -0,0 +1 @@ +../../test/test_container_application.py \ No newline at end of file diff --git a/3.11/test/test_container_basics.py b/3.11/test/test_container_basics.py new file mode 120000 index 00000000..b85dc139 --- /dev/null +++ b/3.11/test/test_container_basics.py @@ -0,0 +1 @@ +../../test/test_container_basics.py \ No newline at end of file diff --git a/3.11/test/test_deploy_templates.py b/3.11/test/test_deploy_templates.py deleted file mode 120000 index 2b15b63f..00000000 --- a/3.11/test/test_deploy_templates.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_deploy_templates.py \ No newline at end of file diff --git a/3.11/test/test_helm_python_django_app.py b/3.11/test/test_helm_python_django_app.py deleted file mode 120000 index 46a601b1..00000000 --- a/3.11/test/test_helm_python_django_app.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_helm_python_django_app.py \ No newline at end of file diff --git a/3.11/test/test_helm_python_django_psql_persistent.py b/3.11/test/test_helm_python_django_psql_persistent.py deleted file mode 120000 index 0667c2f3..00000000 --- a/3.11/test/test_helm_python_django_psql_persistent.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_helm_python_django_psql_persistent.py \ No newline at end of file diff --git a/3.11/test/test_helm_python_imagestreams.py b/3.11/test/test_helm_python_imagestreams.py deleted file mode 120000 index 7be14462..00000000 --- a/3.11/test/test_helm_python_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_helm_python_imagestreams.py \ No newline at end of file diff --git a/3.11/test/test_imagestreams_quickstart.py b/3.11/test/test_imagestreams_quickstart.py deleted file mode 120000 index c238e8c7..00000000 --- a/3.11/test/test_imagestreams_quickstart.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_imagestreams_quickstart.py \ No newline at end of file diff --git a/3.11/test/test_ocp_deploy_templates.py b/3.11/test/test_ocp_deploy_templates.py new file mode 120000 index 00000000..0b821390 --- /dev/null +++ b/3.11/test/test_ocp_deploy_templates.py @@ -0,0 +1 @@ +../../test/test_ocp_deploy_templates.py \ No newline at end of file diff --git a/3.11/test/test_ocp_helm_python_django_app.py b/3.11/test/test_ocp_helm_python_django_app.py new file mode 120000 index 00000000..34b4f0dd --- /dev/null +++ b/3.11/test/test_ocp_helm_python_django_app.py @@ -0,0 +1 @@ +../../test/test_ocp_helm_python_django_app.py \ No newline at end of file diff --git a/3.11/test/test_ocp_helm_python_django_psql_persistent.py b/3.11/test/test_ocp_helm_python_django_psql_persistent.py new file mode 120000 index 00000000..64d2105d --- /dev/null +++ b/3.11/test/test_ocp_helm_python_django_psql_persistent.py @@ -0,0 +1 @@ +../../test/test_ocp_helm_python_django_psql_persistent.py \ No newline at end of file diff --git a/3.11/test/test_ocp_helm_python_imagestreams.py b/3.11/test/test_ocp_helm_python_imagestreams.py new file mode 120000 index 00000000..0022607f --- /dev/null +++ b/3.11/test/test_ocp_helm_python_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_helm_python_imagestreams.py \ No newline at end of file diff --git a/3.11/test/test_ocp_imagestreams_quickstart.py b/3.11/test/test_ocp_imagestreams_quickstart.py new file mode 120000 index 00000000..18f8d7e2 --- /dev/null +++ b/3.11/test/test_ocp_imagestreams_quickstart.py @@ -0,0 +1 @@ +../../test/test_ocp_imagestreams_quickstart.py \ No newline at end of file diff --git a/3.11/test/test_ocp_python_ex_standalone.py b/3.11/test/test_ocp_python_ex_standalone.py new file mode 120000 index 00000000..bb6022f7 --- /dev/null +++ b/3.11/test/test_ocp_python_ex_standalone.py @@ -0,0 +1 @@ +../../test/test_ocp_python_ex_standalone.py \ No newline at end of file diff --git a/3.11/test/test_ocp_python_ex_template.py b/3.11/test/test_ocp_python_ex_template.py new file mode 120000 index 00000000..b75080ca --- /dev/null +++ b/3.11/test/test_ocp_python_ex_template.py @@ -0,0 +1 @@ +../../test/test_ocp_python_ex_template.py \ No newline at end of file diff --git a/3.11/test/test_python_ex_standalone.py b/3.11/test/test_python_ex_standalone.py deleted file mode 120000 index 504a43a3..00000000 --- a/3.11/test/test_python_ex_standalone.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_python_ex_standalone.py \ No newline at end of file diff --git a/3.11/test/test_python_ex_template.py b/3.11/test/test_python_ex_template.py deleted file mode 120000 index 14f15e03..00000000 --- a/3.11/test/test_python_ex_template.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_python_ex_template.py \ No newline at end of file diff --git a/3.12-minimal/test/run-pytest b/3.12-minimal/test/run-pytest new file mode 100755 index 00000000..be66d5a5 --- /dev/null +++ b/3.12-minimal/test/run-pytest @@ -0,0 +1,15 @@ +#!/bin/bash +# +# IMAGE_NAME specifies a name of the candidate image used for testing. +# The image has to be available before this script is executed. +# SINGLE_VERSION specifies the major version of the MariaDB in format of X.Y +# OS specifies RHEL version (e.g. OS=rhel8) +# + +THISDIR=$(dirname ${BASH_SOURCE[0]}) + +PYTHON_VERSION="3.12" +if [[ ! -f "/usr/bin/python$PYTHON_VERSION" ]]; then + PYTHON_VERSION="3.13" +fi +cd "${THISDIR}" && "python${PYTHON_VERSION}" -m pytest -s -rA --showlocals -vv test_container_b*.py diff --git a/3.12-minimal/test/test_container_application.py b/3.12-minimal/test/test_container_application.py new file mode 120000 index 00000000..25c1c1ec --- /dev/null +++ b/3.12-minimal/test/test_container_application.py @@ -0,0 +1 @@ +../../test/test_container_application.py \ No newline at end of file diff --git a/3.12-minimal/test/test_container_basics.py b/3.12-minimal/test/test_container_basics.py new file mode 120000 index 00000000..b85dc139 --- /dev/null +++ b/3.12-minimal/test/test_container_basics.py @@ -0,0 +1 @@ +../../test/test_container_basics.py \ No newline at end of file diff --git a/3.12-minimal/test/test_deploy_templates.py b/3.12-minimal/test/test_deploy_templates.py deleted file mode 120000 index 2b15b63f..00000000 --- a/3.12-minimal/test/test_deploy_templates.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_deploy_templates.py \ No newline at end of file diff --git a/3.12-minimal/test/test_helm_python_django_app.py b/3.12-minimal/test/test_helm_python_django_app.py deleted file mode 120000 index 46a601b1..00000000 --- a/3.12-minimal/test/test_helm_python_django_app.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_helm_python_django_app.py \ No newline at end of file diff --git a/3.12-minimal/test/test_helm_python_django_psql_persistent.py b/3.12-minimal/test/test_helm_python_django_psql_persistent.py deleted file mode 120000 index 0667c2f3..00000000 --- a/3.12-minimal/test/test_helm_python_django_psql_persistent.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_helm_python_django_psql_persistent.py \ No newline at end of file diff --git a/3.12-minimal/test/test_helm_python_imagestreams.py b/3.12-minimal/test/test_helm_python_imagestreams.py deleted file mode 120000 index 7be14462..00000000 --- a/3.12-minimal/test/test_helm_python_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_helm_python_imagestreams.py \ No newline at end of file diff --git a/3.12-minimal/test/test_imagestreams_quickstart.py b/3.12-minimal/test/test_imagestreams_quickstart.py deleted file mode 120000 index c238e8c7..00000000 --- a/3.12-minimal/test/test_imagestreams_quickstart.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_imagestreams_quickstart.py \ No newline at end of file diff --git a/3.12-minimal/test/test_ocp_deploy_templates.py b/3.12-minimal/test/test_ocp_deploy_templates.py new file mode 120000 index 00000000..0b821390 --- /dev/null +++ b/3.12-minimal/test/test_ocp_deploy_templates.py @@ -0,0 +1 @@ +../../test/test_ocp_deploy_templates.py \ No newline at end of file diff --git a/3.12-minimal/test/test_ocp_helm_python_django_app.py b/3.12-minimal/test/test_ocp_helm_python_django_app.py new file mode 120000 index 00000000..34b4f0dd --- /dev/null +++ b/3.12-minimal/test/test_ocp_helm_python_django_app.py @@ -0,0 +1 @@ +../../test/test_ocp_helm_python_django_app.py \ No newline at end of file diff --git a/3.12-minimal/test/test_ocp_helm_python_django_psql_persistent.py b/3.12-minimal/test/test_ocp_helm_python_django_psql_persistent.py new file mode 120000 index 00000000..64d2105d --- /dev/null +++ b/3.12-minimal/test/test_ocp_helm_python_django_psql_persistent.py @@ -0,0 +1 @@ +../../test/test_ocp_helm_python_django_psql_persistent.py \ No newline at end of file diff --git a/3.12-minimal/test/test_ocp_helm_python_imagestreams.py b/3.12-minimal/test/test_ocp_helm_python_imagestreams.py new file mode 120000 index 00000000..0022607f --- /dev/null +++ b/3.12-minimal/test/test_ocp_helm_python_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_helm_python_imagestreams.py \ No newline at end of file diff --git a/3.12-minimal/test/test_ocp_imagestreams_quickstart.py b/3.12-minimal/test/test_ocp_imagestreams_quickstart.py new file mode 120000 index 00000000..18f8d7e2 --- /dev/null +++ b/3.12-minimal/test/test_ocp_imagestreams_quickstart.py @@ -0,0 +1 @@ +../../test/test_ocp_imagestreams_quickstart.py \ No newline at end of file diff --git a/3.12-minimal/test/test_ocp_python_ex_standalone.py b/3.12-minimal/test/test_ocp_python_ex_standalone.py new file mode 120000 index 00000000..bb6022f7 --- /dev/null +++ b/3.12-minimal/test/test_ocp_python_ex_standalone.py @@ -0,0 +1 @@ +../../test/test_ocp_python_ex_standalone.py \ No newline at end of file diff --git a/3.12-minimal/test/test_ocp_python_ex_template.py b/3.12-minimal/test/test_ocp_python_ex_template.py new file mode 120000 index 00000000..b75080ca --- /dev/null +++ b/3.12-minimal/test/test_ocp_python_ex_template.py @@ -0,0 +1 @@ +../../test/test_ocp_python_ex_template.py \ No newline at end of file diff --git a/3.12-minimal/test/test_python_ex_standalone.py b/3.12-minimal/test/test_python_ex_standalone.py deleted file mode 120000 index 504a43a3..00000000 --- a/3.12-minimal/test/test_python_ex_standalone.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_python_ex_standalone.py \ No newline at end of file diff --git a/3.12-minimal/test/test_python_ex_template.py b/3.12-minimal/test/test_python_ex_template.py deleted file mode 120000 index 14f15e03..00000000 --- a/3.12-minimal/test/test_python_ex_template.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_python_ex_template.py \ No newline at end of file diff --git a/3.12/test/run-pytest b/3.12/test/run-pytest new file mode 100755 index 00000000..be66d5a5 --- /dev/null +++ b/3.12/test/run-pytest @@ -0,0 +1,15 @@ +#!/bin/bash +# +# IMAGE_NAME specifies a name of the candidate image used for testing. +# The image has to be available before this script is executed. +# SINGLE_VERSION specifies the major version of the MariaDB in format of X.Y +# OS specifies RHEL version (e.g. OS=rhel8) +# + +THISDIR=$(dirname ${BASH_SOURCE[0]}) + +PYTHON_VERSION="3.12" +if [[ ! -f "/usr/bin/python$PYTHON_VERSION" ]]; then + PYTHON_VERSION="3.13" +fi +cd "${THISDIR}" && "python${PYTHON_VERSION}" -m pytest -s -rA --showlocals -vv test_container_b*.py diff --git a/3.12/test/test_container_application.py b/3.12/test/test_container_application.py new file mode 120000 index 00000000..25c1c1ec --- /dev/null +++ b/3.12/test/test_container_application.py @@ -0,0 +1 @@ +../../test/test_container_application.py \ No newline at end of file diff --git a/3.12/test/test_container_basics.py b/3.12/test/test_container_basics.py new file mode 120000 index 00000000..b85dc139 --- /dev/null +++ b/3.12/test/test_container_basics.py @@ -0,0 +1 @@ +../../test/test_container_basics.py \ No newline at end of file diff --git a/3.12/test/test_deploy_templates.py b/3.12/test/test_deploy_templates.py deleted file mode 120000 index 2b15b63f..00000000 --- a/3.12/test/test_deploy_templates.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_deploy_templates.py \ No newline at end of file diff --git a/3.12/test/test_helm_python_django_app.py b/3.12/test/test_helm_python_django_app.py deleted file mode 120000 index 46a601b1..00000000 --- a/3.12/test/test_helm_python_django_app.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_helm_python_django_app.py \ No newline at end of file diff --git a/3.12/test/test_helm_python_django_psql_persistent.py b/3.12/test/test_helm_python_django_psql_persistent.py deleted file mode 120000 index 0667c2f3..00000000 --- a/3.12/test/test_helm_python_django_psql_persistent.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_helm_python_django_psql_persistent.py \ No newline at end of file diff --git a/3.12/test/test_helm_python_imagestreams.py b/3.12/test/test_helm_python_imagestreams.py deleted file mode 120000 index 7be14462..00000000 --- a/3.12/test/test_helm_python_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_helm_python_imagestreams.py \ No newline at end of file diff --git a/3.12/test/test_imagestreams_quickstart.py b/3.12/test/test_imagestreams_quickstart.py deleted file mode 120000 index c238e8c7..00000000 --- a/3.12/test/test_imagestreams_quickstart.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_imagestreams_quickstart.py \ No newline at end of file diff --git a/3.12/test/test_ocp_deploy_templates.py b/3.12/test/test_ocp_deploy_templates.py new file mode 120000 index 00000000..0b821390 --- /dev/null +++ b/3.12/test/test_ocp_deploy_templates.py @@ -0,0 +1 @@ +../../test/test_ocp_deploy_templates.py \ No newline at end of file diff --git a/3.12/test/test_ocp_helm_python_django_app.py b/3.12/test/test_ocp_helm_python_django_app.py new file mode 120000 index 00000000..34b4f0dd --- /dev/null +++ b/3.12/test/test_ocp_helm_python_django_app.py @@ -0,0 +1 @@ +../../test/test_ocp_helm_python_django_app.py \ No newline at end of file diff --git a/3.12/test/test_ocp_helm_python_django_psql_persistent.py b/3.12/test/test_ocp_helm_python_django_psql_persistent.py new file mode 120000 index 00000000..64d2105d --- /dev/null +++ b/3.12/test/test_ocp_helm_python_django_psql_persistent.py @@ -0,0 +1 @@ +../../test/test_ocp_helm_python_django_psql_persistent.py \ No newline at end of file diff --git a/3.12/test/test_ocp_helm_python_imagestreams.py b/3.12/test/test_ocp_helm_python_imagestreams.py new file mode 120000 index 00000000..0022607f --- /dev/null +++ b/3.12/test/test_ocp_helm_python_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_helm_python_imagestreams.py \ No newline at end of file diff --git a/3.12/test/test_ocp_imagestreams_quickstart.py b/3.12/test/test_ocp_imagestreams_quickstart.py new file mode 120000 index 00000000..18f8d7e2 --- /dev/null +++ b/3.12/test/test_ocp_imagestreams_quickstart.py @@ -0,0 +1 @@ +../../test/test_ocp_imagestreams_quickstart.py \ No newline at end of file diff --git a/3.12/test/test_ocp_python_ex_standalone.py b/3.12/test/test_ocp_python_ex_standalone.py new file mode 120000 index 00000000..bb6022f7 --- /dev/null +++ b/3.12/test/test_ocp_python_ex_standalone.py @@ -0,0 +1 @@ +../../test/test_ocp_python_ex_standalone.py \ No newline at end of file diff --git a/3.12/test/test_ocp_python_ex_template.py b/3.12/test/test_ocp_python_ex_template.py new file mode 120000 index 00000000..b75080ca --- /dev/null +++ b/3.12/test/test_ocp_python_ex_template.py @@ -0,0 +1 @@ +../../test/test_ocp_python_ex_template.py \ No newline at end of file diff --git a/3.12/test/test_python_ex_standalone.py b/3.12/test/test_python_ex_standalone.py deleted file mode 120000 index 504a43a3..00000000 --- a/3.12/test/test_python_ex_standalone.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_python_ex_standalone.py \ No newline at end of file diff --git a/3.12/test/test_python_ex_template.py b/3.12/test/test_python_ex_template.py deleted file mode 120000 index 14f15e03..00000000 --- a/3.12/test/test_python_ex_template.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_python_ex_template.py \ No newline at end of file diff --git a/3.13-minimal/test/run-pytest b/3.13-minimal/test/run-pytest new file mode 100755 index 00000000..be66d5a5 --- /dev/null +++ b/3.13-minimal/test/run-pytest @@ -0,0 +1,15 @@ +#!/bin/bash +# +# IMAGE_NAME specifies a name of the candidate image used for testing. +# The image has to be available before this script is executed. +# SINGLE_VERSION specifies the major version of the MariaDB in format of X.Y +# OS specifies RHEL version (e.g. OS=rhel8) +# + +THISDIR=$(dirname ${BASH_SOURCE[0]}) + +PYTHON_VERSION="3.12" +if [[ ! -f "/usr/bin/python$PYTHON_VERSION" ]]; then + PYTHON_VERSION="3.13" +fi +cd "${THISDIR}" && "python${PYTHON_VERSION}" -m pytest -s -rA --showlocals -vv test_container_b*.py diff --git a/3.13-minimal/test/test_container_application.py b/3.13-minimal/test/test_container_application.py new file mode 120000 index 00000000..25c1c1ec --- /dev/null +++ b/3.13-minimal/test/test_container_application.py @@ -0,0 +1 @@ +../../test/test_container_application.py \ No newline at end of file diff --git a/3.13-minimal/test/test_container_basics.py b/3.13-minimal/test/test_container_basics.py new file mode 120000 index 00000000..b85dc139 --- /dev/null +++ b/3.13-minimal/test/test_container_basics.py @@ -0,0 +1 @@ +../../test/test_container_basics.py \ No newline at end of file diff --git a/3.13-minimal/test/test_deploy_templates.py b/3.13-minimal/test/test_deploy_templates.py deleted file mode 120000 index 2b15b63f..00000000 --- a/3.13-minimal/test/test_deploy_templates.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_deploy_templates.py \ No newline at end of file diff --git a/3.13-minimal/test/test_helm_python_django_app.py b/3.13-minimal/test/test_helm_python_django_app.py deleted file mode 120000 index 46a601b1..00000000 --- a/3.13-minimal/test/test_helm_python_django_app.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_helm_python_django_app.py \ No newline at end of file diff --git a/3.13-minimal/test/test_helm_python_django_psql_persistent.py b/3.13-minimal/test/test_helm_python_django_psql_persistent.py deleted file mode 120000 index 0667c2f3..00000000 --- a/3.13-minimal/test/test_helm_python_django_psql_persistent.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_helm_python_django_psql_persistent.py \ No newline at end of file diff --git a/3.13-minimal/test/test_helm_python_imagestreams.py b/3.13-minimal/test/test_helm_python_imagestreams.py deleted file mode 120000 index 7be14462..00000000 --- a/3.13-minimal/test/test_helm_python_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_helm_python_imagestreams.py \ No newline at end of file diff --git a/3.13-minimal/test/test_imagestreams_quickstart.py b/3.13-minimal/test/test_imagestreams_quickstart.py deleted file mode 120000 index c238e8c7..00000000 --- a/3.13-minimal/test/test_imagestreams_quickstart.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_imagestreams_quickstart.py \ No newline at end of file diff --git a/3.13-minimal/test/test_ocp_deploy_templates.py b/3.13-minimal/test/test_ocp_deploy_templates.py new file mode 120000 index 00000000..0b821390 --- /dev/null +++ b/3.13-minimal/test/test_ocp_deploy_templates.py @@ -0,0 +1 @@ +../../test/test_ocp_deploy_templates.py \ No newline at end of file diff --git a/3.13-minimal/test/test_ocp_helm_python_django_app.py b/3.13-minimal/test/test_ocp_helm_python_django_app.py new file mode 120000 index 00000000..34b4f0dd --- /dev/null +++ b/3.13-minimal/test/test_ocp_helm_python_django_app.py @@ -0,0 +1 @@ +../../test/test_ocp_helm_python_django_app.py \ No newline at end of file diff --git a/3.13-minimal/test/test_ocp_helm_python_django_psql_persistent.py b/3.13-minimal/test/test_ocp_helm_python_django_psql_persistent.py new file mode 120000 index 00000000..64d2105d --- /dev/null +++ b/3.13-minimal/test/test_ocp_helm_python_django_psql_persistent.py @@ -0,0 +1 @@ +../../test/test_ocp_helm_python_django_psql_persistent.py \ No newline at end of file diff --git a/3.13-minimal/test/test_ocp_helm_python_imagestreams.py b/3.13-minimal/test/test_ocp_helm_python_imagestreams.py new file mode 120000 index 00000000..0022607f --- /dev/null +++ b/3.13-minimal/test/test_ocp_helm_python_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_helm_python_imagestreams.py \ No newline at end of file diff --git a/3.13-minimal/test/test_ocp_imagestreams_quickstart.py b/3.13-minimal/test/test_ocp_imagestreams_quickstart.py new file mode 120000 index 00000000..18f8d7e2 --- /dev/null +++ b/3.13-minimal/test/test_ocp_imagestreams_quickstart.py @@ -0,0 +1 @@ +../../test/test_ocp_imagestreams_quickstart.py \ No newline at end of file diff --git a/3.13-minimal/test/test_ocp_python_ex_standalone.py b/3.13-minimal/test/test_ocp_python_ex_standalone.py new file mode 120000 index 00000000..bb6022f7 --- /dev/null +++ b/3.13-minimal/test/test_ocp_python_ex_standalone.py @@ -0,0 +1 @@ +../../test/test_ocp_python_ex_standalone.py \ No newline at end of file diff --git a/3.13-minimal/test/test_ocp_python_ex_template.py b/3.13-minimal/test/test_ocp_python_ex_template.py new file mode 120000 index 00000000..b75080ca --- /dev/null +++ b/3.13-minimal/test/test_ocp_python_ex_template.py @@ -0,0 +1 @@ +../../test/test_ocp_python_ex_template.py \ No newline at end of file diff --git a/3.13-minimal/test/test_python_ex_standalone.py b/3.13-minimal/test/test_python_ex_standalone.py deleted file mode 120000 index 504a43a3..00000000 --- a/3.13-minimal/test/test_python_ex_standalone.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_python_ex_standalone.py \ No newline at end of file diff --git a/3.13-minimal/test/test_python_ex_template.py b/3.13-minimal/test/test_python_ex_template.py deleted file mode 120000 index 14f15e03..00000000 --- a/3.13-minimal/test/test_python_ex_template.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_python_ex_template.py \ No newline at end of file diff --git a/3.13/test/run-pytest b/3.13/test/run-pytest new file mode 100755 index 00000000..be66d5a5 --- /dev/null +++ b/3.13/test/run-pytest @@ -0,0 +1,15 @@ +#!/bin/bash +# +# IMAGE_NAME specifies a name of the candidate image used for testing. +# The image has to be available before this script is executed. +# SINGLE_VERSION specifies the major version of the MariaDB in format of X.Y +# OS specifies RHEL version (e.g. OS=rhel8) +# + +THISDIR=$(dirname ${BASH_SOURCE[0]}) + +PYTHON_VERSION="3.12" +if [[ ! -f "/usr/bin/python$PYTHON_VERSION" ]]; then + PYTHON_VERSION="3.13" +fi +cd "${THISDIR}" && "python${PYTHON_VERSION}" -m pytest -s -rA --showlocals -vv test_container_b*.py diff --git a/3.13/test/test_container_application.py b/3.13/test/test_container_application.py new file mode 120000 index 00000000..25c1c1ec --- /dev/null +++ b/3.13/test/test_container_application.py @@ -0,0 +1 @@ +../../test/test_container_application.py \ No newline at end of file diff --git a/3.13/test/test_container_basics.py b/3.13/test/test_container_basics.py new file mode 120000 index 00000000..b85dc139 --- /dev/null +++ b/3.13/test/test_container_basics.py @@ -0,0 +1 @@ +../../test/test_container_basics.py \ No newline at end of file diff --git a/3.13/test/test_deploy_templates.py b/3.13/test/test_deploy_templates.py deleted file mode 120000 index 2b15b63f..00000000 --- a/3.13/test/test_deploy_templates.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_deploy_templates.py \ No newline at end of file diff --git a/3.13/test/test_helm_python_django_app.py b/3.13/test/test_helm_python_django_app.py deleted file mode 120000 index 46a601b1..00000000 --- a/3.13/test/test_helm_python_django_app.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_helm_python_django_app.py \ No newline at end of file diff --git a/3.13/test/test_helm_python_django_psql_persistent.py b/3.13/test/test_helm_python_django_psql_persistent.py deleted file mode 120000 index 0667c2f3..00000000 --- a/3.13/test/test_helm_python_django_psql_persistent.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_helm_python_django_psql_persistent.py \ No newline at end of file diff --git a/3.13/test/test_helm_python_imagestreams.py b/3.13/test/test_helm_python_imagestreams.py deleted file mode 120000 index 7be14462..00000000 --- a/3.13/test/test_helm_python_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_helm_python_imagestreams.py \ No newline at end of file diff --git a/3.13/test/test_imagestreams_quickstart.py b/3.13/test/test_imagestreams_quickstart.py deleted file mode 120000 index c238e8c7..00000000 --- a/3.13/test/test_imagestreams_quickstart.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_imagestreams_quickstart.py \ No newline at end of file diff --git a/3.13/test/test_ocp_deploy_templates.py b/3.13/test/test_ocp_deploy_templates.py new file mode 120000 index 00000000..0b821390 --- /dev/null +++ b/3.13/test/test_ocp_deploy_templates.py @@ -0,0 +1 @@ +../../test/test_ocp_deploy_templates.py \ No newline at end of file diff --git a/3.13/test/test_ocp_helm_python_django_app.py b/3.13/test/test_ocp_helm_python_django_app.py new file mode 120000 index 00000000..34b4f0dd --- /dev/null +++ b/3.13/test/test_ocp_helm_python_django_app.py @@ -0,0 +1 @@ +../../test/test_ocp_helm_python_django_app.py \ No newline at end of file diff --git a/3.13/test/test_ocp_helm_python_django_psql_persistent.py b/3.13/test/test_ocp_helm_python_django_psql_persistent.py new file mode 120000 index 00000000..64d2105d --- /dev/null +++ b/3.13/test/test_ocp_helm_python_django_psql_persistent.py @@ -0,0 +1 @@ +../../test/test_ocp_helm_python_django_psql_persistent.py \ No newline at end of file diff --git a/3.13/test/test_ocp_helm_python_imagestreams.py b/3.13/test/test_ocp_helm_python_imagestreams.py new file mode 120000 index 00000000..0022607f --- /dev/null +++ b/3.13/test/test_ocp_helm_python_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_helm_python_imagestreams.py \ No newline at end of file diff --git a/3.13/test/test_ocp_imagestreams_quickstart.py b/3.13/test/test_ocp_imagestreams_quickstart.py new file mode 120000 index 00000000..18f8d7e2 --- /dev/null +++ b/3.13/test/test_ocp_imagestreams_quickstart.py @@ -0,0 +1 @@ +../../test/test_ocp_imagestreams_quickstart.py \ No newline at end of file diff --git a/3.13/test/test_ocp_python_ex_standalone.py b/3.13/test/test_ocp_python_ex_standalone.py new file mode 120000 index 00000000..bb6022f7 --- /dev/null +++ b/3.13/test/test_ocp_python_ex_standalone.py @@ -0,0 +1 @@ +../../test/test_ocp_python_ex_standalone.py \ No newline at end of file diff --git a/3.13/test/test_ocp_python_ex_template.py b/3.13/test/test_ocp_python_ex_template.py new file mode 120000 index 00000000..b75080ca --- /dev/null +++ b/3.13/test/test_ocp_python_ex_template.py @@ -0,0 +1 @@ +../../test/test_ocp_python_ex_template.py \ No newline at end of file diff --git a/3.13/test/test_python_ex_standalone.py b/3.13/test/test_python_ex_standalone.py deleted file mode 120000 index 504a43a3..00000000 --- a/3.13/test/test_python_ex_standalone.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_python_ex_standalone.py \ No newline at end of file diff --git a/3.13/test/test_python_ex_template.py b/3.13/test/test_python_ex_template.py deleted file mode 120000 index 14f15e03..00000000 --- a/3.13/test/test_python_ex_template.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_python_ex_template.py \ No newline at end of file diff --git a/3.6/test/run-pytest b/3.6/test/run-pytest new file mode 100755 index 00000000..be66d5a5 --- /dev/null +++ b/3.6/test/run-pytest @@ -0,0 +1,15 @@ +#!/bin/bash +# +# IMAGE_NAME specifies a name of the candidate image used for testing. +# The image has to be available before this script is executed. +# SINGLE_VERSION specifies the major version of the MariaDB in format of X.Y +# OS specifies RHEL version (e.g. OS=rhel8) +# + +THISDIR=$(dirname ${BASH_SOURCE[0]}) + +PYTHON_VERSION="3.12" +if [[ ! -f "/usr/bin/python$PYTHON_VERSION" ]]; then + PYTHON_VERSION="3.13" +fi +cd "${THISDIR}" && "python${PYTHON_VERSION}" -m pytest -s -rA --showlocals -vv test_container_b*.py diff --git a/3.6/test/test_container_application.py b/3.6/test/test_container_application.py new file mode 120000 index 00000000..25c1c1ec --- /dev/null +++ b/3.6/test/test_container_application.py @@ -0,0 +1 @@ +../../test/test_container_application.py \ No newline at end of file diff --git a/3.6/test/test_container_basics.py b/3.6/test/test_container_basics.py new file mode 120000 index 00000000..b85dc139 --- /dev/null +++ b/3.6/test/test_container_basics.py @@ -0,0 +1 @@ +../../test/test_container_basics.py \ No newline at end of file diff --git a/3.6/test/test_deploy_templates.py b/3.6/test/test_deploy_templates.py deleted file mode 120000 index 2b15b63f..00000000 --- a/3.6/test/test_deploy_templates.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_deploy_templates.py \ No newline at end of file diff --git a/3.6/test/test_helm_python_django_app.py b/3.6/test/test_helm_python_django_app.py deleted file mode 120000 index 46a601b1..00000000 --- a/3.6/test/test_helm_python_django_app.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_helm_python_django_app.py \ No newline at end of file diff --git a/3.6/test/test_helm_python_django_psql_persistent.py b/3.6/test/test_helm_python_django_psql_persistent.py deleted file mode 120000 index 0667c2f3..00000000 --- a/3.6/test/test_helm_python_django_psql_persistent.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_helm_python_django_psql_persistent.py \ No newline at end of file diff --git a/3.6/test/test_helm_python_imagestreams.py b/3.6/test/test_helm_python_imagestreams.py deleted file mode 120000 index 7be14462..00000000 --- a/3.6/test/test_helm_python_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_helm_python_imagestreams.py \ No newline at end of file diff --git a/3.6/test/test_imagestreams_quickstart.py b/3.6/test/test_imagestreams_quickstart.py deleted file mode 120000 index c238e8c7..00000000 --- a/3.6/test/test_imagestreams_quickstart.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_imagestreams_quickstart.py \ No newline at end of file diff --git a/3.6/test/test_ocp_deploy_templates.py b/3.6/test/test_ocp_deploy_templates.py new file mode 120000 index 00000000..0b821390 --- /dev/null +++ b/3.6/test/test_ocp_deploy_templates.py @@ -0,0 +1 @@ +../../test/test_ocp_deploy_templates.py \ No newline at end of file diff --git a/3.6/test/test_ocp_helm_python_django_app.py b/3.6/test/test_ocp_helm_python_django_app.py new file mode 120000 index 00000000..34b4f0dd --- /dev/null +++ b/3.6/test/test_ocp_helm_python_django_app.py @@ -0,0 +1 @@ +../../test/test_ocp_helm_python_django_app.py \ No newline at end of file diff --git a/3.6/test/test_ocp_helm_python_django_psql_persistent.py b/3.6/test/test_ocp_helm_python_django_psql_persistent.py new file mode 120000 index 00000000..64d2105d --- /dev/null +++ b/3.6/test/test_ocp_helm_python_django_psql_persistent.py @@ -0,0 +1 @@ +../../test/test_ocp_helm_python_django_psql_persistent.py \ No newline at end of file diff --git a/3.6/test/test_ocp_helm_python_imagestreams.py b/3.6/test/test_ocp_helm_python_imagestreams.py new file mode 120000 index 00000000..0022607f --- /dev/null +++ b/3.6/test/test_ocp_helm_python_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_helm_python_imagestreams.py \ No newline at end of file diff --git a/3.6/test/test_ocp_imagestreams_quickstart.py b/3.6/test/test_ocp_imagestreams_quickstart.py new file mode 120000 index 00000000..18f8d7e2 --- /dev/null +++ b/3.6/test/test_ocp_imagestreams_quickstart.py @@ -0,0 +1 @@ +../../test/test_ocp_imagestreams_quickstart.py \ No newline at end of file diff --git a/3.6/test/test_ocp_python_ex_standalone.py b/3.6/test/test_ocp_python_ex_standalone.py new file mode 120000 index 00000000..bb6022f7 --- /dev/null +++ b/3.6/test/test_ocp_python_ex_standalone.py @@ -0,0 +1 @@ +../../test/test_ocp_python_ex_standalone.py \ No newline at end of file diff --git a/3.6/test/test_ocp_python_ex_template.py b/3.6/test/test_ocp_python_ex_template.py new file mode 120000 index 00000000..b75080ca --- /dev/null +++ b/3.6/test/test_ocp_python_ex_template.py @@ -0,0 +1 @@ +../../test/test_ocp_python_ex_template.py \ No newline at end of file diff --git a/3.6/test/test_python_ex_standalone.py b/3.6/test/test_python_ex_standalone.py deleted file mode 120000 index 504a43a3..00000000 --- a/3.6/test/test_python_ex_standalone.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_python_ex_standalone.py \ No newline at end of file diff --git a/3.6/test/test_python_ex_template.py b/3.6/test/test_python_ex_template.py deleted file mode 120000 index 14f15e03..00000000 --- a/3.6/test/test_python_ex_template.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_python_ex_template.py \ No newline at end of file diff --git a/3.9-minimal/test/run-pytest b/3.9-minimal/test/run-pytest new file mode 100755 index 00000000..be66d5a5 --- /dev/null +++ b/3.9-minimal/test/run-pytest @@ -0,0 +1,15 @@ +#!/bin/bash +# +# IMAGE_NAME specifies a name of the candidate image used for testing. +# The image has to be available before this script is executed. +# SINGLE_VERSION specifies the major version of the MariaDB in format of X.Y +# OS specifies RHEL version (e.g. OS=rhel8) +# + +THISDIR=$(dirname ${BASH_SOURCE[0]}) + +PYTHON_VERSION="3.12" +if [[ ! -f "/usr/bin/python$PYTHON_VERSION" ]]; then + PYTHON_VERSION="3.13" +fi +cd "${THISDIR}" && "python${PYTHON_VERSION}" -m pytest -s -rA --showlocals -vv test_container_b*.py diff --git a/3.9-minimal/test/test_container_application.py b/3.9-minimal/test/test_container_application.py new file mode 120000 index 00000000..25c1c1ec --- /dev/null +++ b/3.9-minimal/test/test_container_application.py @@ -0,0 +1 @@ +../../test/test_container_application.py \ No newline at end of file diff --git a/3.9-minimal/test/test_container_basics.py b/3.9-minimal/test/test_container_basics.py new file mode 120000 index 00000000..b85dc139 --- /dev/null +++ b/3.9-minimal/test/test_container_basics.py @@ -0,0 +1 @@ +../../test/test_container_basics.py \ No newline at end of file diff --git a/3.9-minimal/test/test_deploy_templates.py b/3.9-minimal/test/test_deploy_templates.py deleted file mode 120000 index 2b15b63f..00000000 --- a/3.9-minimal/test/test_deploy_templates.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_deploy_templates.py \ No newline at end of file diff --git a/3.9-minimal/test/test_helm_python_django_app.py b/3.9-minimal/test/test_helm_python_django_app.py deleted file mode 120000 index 46a601b1..00000000 --- a/3.9-minimal/test/test_helm_python_django_app.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_helm_python_django_app.py \ No newline at end of file diff --git a/3.9-minimal/test/test_helm_python_django_psql_persistent.py b/3.9-minimal/test/test_helm_python_django_psql_persistent.py deleted file mode 120000 index 0667c2f3..00000000 --- a/3.9-minimal/test/test_helm_python_django_psql_persistent.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_helm_python_django_psql_persistent.py \ No newline at end of file diff --git a/3.9-minimal/test/test_helm_python_imagestreams.py b/3.9-minimal/test/test_helm_python_imagestreams.py deleted file mode 120000 index 7be14462..00000000 --- a/3.9-minimal/test/test_helm_python_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_helm_python_imagestreams.py \ No newline at end of file diff --git a/3.9-minimal/test/test_imagestreams_quickstart.py b/3.9-minimal/test/test_imagestreams_quickstart.py deleted file mode 120000 index c238e8c7..00000000 --- a/3.9-minimal/test/test_imagestreams_quickstart.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_imagestreams_quickstart.py \ No newline at end of file diff --git a/3.9-minimal/test/test_ocp_deploy_templates.py b/3.9-minimal/test/test_ocp_deploy_templates.py new file mode 120000 index 00000000..0b821390 --- /dev/null +++ b/3.9-minimal/test/test_ocp_deploy_templates.py @@ -0,0 +1 @@ +../../test/test_ocp_deploy_templates.py \ No newline at end of file diff --git a/3.9-minimal/test/test_ocp_helm_python_django_app.py b/3.9-minimal/test/test_ocp_helm_python_django_app.py new file mode 120000 index 00000000..34b4f0dd --- /dev/null +++ b/3.9-minimal/test/test_ocp_helm_python_django_app.py @@ -0,0 +1 @@ +../../test/test_ocp_helm_python_django_app.py \ No newline at end of file diff --git a/3.9-minimal/test/test_ocp_helm_python_django_psql_persistent.py b/3.9-minimal/test/test_ocp_helm_python_django_psql_persistent.py new file mode 120000 index 00000000..64d2105d --- /dev/null +++ b/3.9-minimal/test/test_ocp_helm_python_django_psql_persistent.py @@ -0,0 +1 @@ +../../test/test_ocp_helm_python_django_psql_persistent.py \ No newline at end of file diff --git a/3.9-minimal/test/test_ocp_helm_python_imagestreams.py b/3.9-minimal/test/test_ocp_helm_python_imagestreams.py new file mode 120000 index 00000000..0022607f --- /dev/null +++ b/3.9-minimal/test/test_ocp_helm_python_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_helm_python_imagestreams.py \ No newline at end of file diff --git a/3.9-minimal/test/test_ocp_imagestreams_quickstart.py b/3.9-minimal/test/test_ocp_imagestreams_quickstart.py new file mode 120000 index 00000000..18f8d7e2 --- /dev/null +++ b/3.9-minimal/test/test_ocp_imagestreams_quickstart.py @@ -0,0 +1 @@ +../../test/test_ocp_imagestreams_quickstart.py \ No newline at end of file diff --git a/3.9-minimal/test/test_ocp_python_ex_standalone.py b/3.9-minimal/test/test_ocp_python_ex_standalone.py new file mode 120000 index 00000000..bb6022f7 --- /dev/null +++ b/3.9-minimal/test/test_ocp_python_ex_standalone.py @@ -0,0 +1 @@ +../../test/test_ocp_python_ex_standalone.py \ No newline at end of file diff --git a/3.9-minimal/test/test_ocp_python_ex_template.py b/3.9-minimal/test/test_ocp_python_ex_template.py new file mode 120000 index 00000000..b75080ca --- /dev/null +++ b/3.9-minimal/test/test_ocp_python_ex_template.py @@ -0,0 +1 @@ +../../test/test_ocp_python_ex_template.py \ No newline at end of file diff --git a/3.9-minimal/test/test_python_ex_standalone.py b/3.9-minimal/test/test_python_ex_standalone.py deleted file mode 120000 index 504a43a3..00000000 --- a/3.9-minimal/test/test_python_ex_standalone.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_python_ex_standalone.py \ No newline at end of file diff --git a/3.9-minimal/test/test_python_ex_template.py b/3.9-minimal/test/test_python_ex_template.py deleted file mode 120000 index 14f15e03..00000000 --- a/3.9-minimal/test/test_python_ex_template.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_python_ex_template.py \ No newline at end of file diff --git a/3.9/test/run-pytest b/3.9/test/run-pytest new file mode 100755 index 00000000..be66d5a5 --- /dev/null +++ b/3.9/test/run-pytest @@ -0,0 +1,15 @@ +#!/bin/bash +# +# IMAGE_NAME specifies a name of the candidate image used for testing. +# The image has to be available before this script is executed. +# SINGLE_VERSION specifies the major version of the MariaDB in format of X.Y +# OS specifies RHEL version (e.g. OS=rhel8) +# + +THISDIR=$(dirname ${BASH_SOURCE[0]}) + +PYTHON_VERSION="3.12" +if [[ ! -f "/usr/bin/python$PYTHON_VERSION" ]]; then + PYTHON_VERSION="3.13" +fi +cd "${THISDIR}" && "python${PYTHON_VERSION}" -m pytest -s -rA --showlocals -vv test_container_b*.py diff --git a/3.9/test/test_container_application.py b/3.9/test/test_container_application.py new file mode 120000 index 00000000..25c1c1ec --- /dev/null +++ b/3.9/test/test_container_application.py @@ -0,0 +1 @@ +../../test/test_container_application.py \ No newline at end of file diff --git a/3.9/test/test_container_basics.py b/3.9/test/test_container_basics.py new file mode 120000 index 00000000..b85dc139 --- /dev/null +++ b/3.9/test/test_container_basics.py @@ -0,0 +1 @@ +../../test/test_container_basics.py \ No newline at end of file diff --git a/3.9/test/test_deploy_templates.py b/3.9/test/test_deploy_templates.py deleted file mode 120000 index 2b15b63f..00000000 --- a/3.9/test/test_deploy_templates.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_deploy_templates.py \ No newline at end of file diff --git a/3.9/test/test_helm_python_django_app.py b/3.9/test/test_helm_python_django_app.py deleted file mode 120000 index 46a601b1..00000000 --- a/3.9/test/test_helm_python_django_app.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_helm_python_django_app.py \ No newline at end of file diff --git a/3.9/test/test_helm_python_django_psql_persistent.py b/3.9/test/test_helm_python_django_psql_persistent.py deleted file mode 120000 index 0667c2f3..00000000 --- a/3.9/test/test_helm_python_django_psql_persistent.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_helm_python_django_psql_persistent.py \ No newline at end of file diff --git a/3.9/test/test_helm_python_imagestreams.py b/3.9/test/test_helm_python_imagestreams.py deleted file mode 120000 index 7be14462..00000000 --- a/3.9/test/test_helm_python_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_helm_python_imagestreams.py \ No newline at end of file diff --git a/3.9/test/test_imagestreams_quickstart.py b/3.9/test/test_imagestreams_quickstart.py deleted file mode 120000 index c238e8c7..00000000 --- a/3.9/test/test_imagestreams_quickstart.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_imagestreams_quickstart.py \ No newline at end of file diff --git a/3.9/test/test_ocp_deploy_templates.py b/3.9/test/test_ocp_deploy_templates.py new file mode 120000 index 00000000..0b821390 --- /dev/null +++ b/3.9/test/test_ocp_deploy_templates.py @@ -0,0 +1 @@ +../../test/test_ocp_deploy_templates.py \ No newline at end of file diff --git a/3.9/test/test_ocp_helm_python_django_app.py b/3.9/test/test_ocp_helm_python_django_app.py new file mode 120000 index 00000000..34b4f0dd --- /dev/null +++ b/3.9/test/test_ocp_helm_python_django_app.py @@ -0,0 +1 @@ +../../test/test_ocp_helm_python_django_app.py \ No newline at end of file diff --git a/3.9/test/test_ocp_helm_python_django_psql_persistent.py b/3.9/test/test_ocp_helm_python_django_psql_persistent.py new file mode 120000 index 00000000..64d2105d --- /dev/null +++ b/3.9/test/test_ocp_helm_python_django_psql_persistent.py @@ -0,0 +1 @@ +../../test/test_ocp_helm_python_django_psql_persistent.py \ No newline at end of file diff --git a/3.9/test/test_ocp_helm_python_imagestreams.py b/3.9/test/test_ocp_helm_python_imagestreams.py new file mode 120000 index 00000000..0022607f --- /dev/null +++ b/3.9/test/test_ocp_helm_python_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_helm_python_imagestreams.py \ No newline at end of file diff --git a/3.9/test/test_ocp_imagestreams_quickstart.py b/3.9/test/test_ocp_imagestreams_quickstart.py new file mode 120000 index 00000000..18f8d7e2 --- /dev/null +++ b/3.9/test/test_ocp_imagestreams_quickstart.py @@ -0,0 +1 @@ +../../test/test_ocp_imagestreams_quickstart.py \ No newline at end of file diff --git a/3.9/test/test_ocp_python_ex_standalone.py b/3.9/test/test_ocp_python_ex_standalone.py new file mode 120000 index 00000000..bb6022f7 --- /dev/null +++ b/3.9/test/test_ocp_python_ex_standalone.py @@ -0,0 +1 @@ +../../test/test_ocp_python_ex_standalone.py \ No newline at end of file diff --git a/3.9/test/test_ocp_python_ex_template.py b/3.9/test/test_ocp_python_ex_template.py new file mode 120000 index 00000000..b75080ca --- /dev/null +++ b/3.9/test/test_ocp_python_ex_template.py @@ -0,0 +1 @@ +../../test/test_ocp_python_ex_template.py \ No newline at end of file diff --git a/3.9/test/test_python_ex_standalone.py b/3.9/test/test_python_ex_standalone.py deleted file mode 120000 index 504a43a3..00000000 --- a/3.9/test/test_python_ex_standalone.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_python_ex_standalone.py \ No newline at end of file diff --git a/3.9/test/test_python_ex_template.py b/3.9/test/test_python_ex_template.py deleted file mode 120000 index 14f15e03..00000000 --- a/3.9/test/test_python_ex_template.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_python_ex_template.py \ No newline at end of file From e2004a538fed94443d6b0e4c1aba76345d7b3722 Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Wed, 12 Nov 2025 09:43:36 +0100 Subject: [PATCH 4/4] Run all tests and not only `test_container_basics.py` Add distgen generated files Signed-off-by: Petr "Stone" Hracek --- 3.11-minimal/test/run-pytest | 2 +- 3.11/test/run-pytest | 2 +- 3.12-minimal/test/run-pytest | 2 +- 3.12/test/run-pytest | 2 +- 3.13-minimal/test/run-pytest | 2 +- 3.13/test/run-pytest | 2 +- 3.6/test/run-pytest | 2 +- 3.9-minimal/test/run-pytest | 2 +- 3.9/test/run-pytest | 2 +- test/run-pytest | 2 +- test/test_container_basics.py | 57 +++++++++++++++++------------------ 11 files changed, 38 insertions(+), 39 deletions(-) diff --git a/3.11-minimal/test/run-pytest b/3.11-minimal/test/run-pytest index be66d5a5..e69959ad 100755 --- a/3.11-minimal/test/run-pytest +++ b/3.11-minimal/test/run-pytest @@ -12,4 +12,4 @@ PYTHON_VERSION="3.12" if [[ ! -f "/usr/bin/python$PYTHON_VERSION" ]]; then PYTHON_VERSION="3.13" fi -cd "${THISDIR}" && "python${PYTHON_VERSION}" -m pytest -s -rA --showlocals -vv test_container_b*.py +cd "${THISDIR}" && "python${PYTHON_VERSION}" -m pytest -s -rA --showlocals -vv test_container_*.py diff --git a/3.11/test/run-pytest b/3.11/test/run-pytest index be66d5a5..e69959ad 100755 --- a/3.11/test/run-pytest +++ b/3.11/test/run-pytest @@ -12,4 +12,4 @@ PYTHON_VERSION="3.12" if [[ ! -f "/usr/bin/python$PYTHON_VERSION" ]]; then PYTHON_VERSION="3.13" fi -cd "${THISDIR}" && "python${PYTHON_VERSION}" -m pytest -s -rA --showlocals -vv test_container_b*.py +cd "${THISDIR}" && "python${PYTHON_VERSION}" -m pytest -s -rA --showlocals -vv test_container_*.py diff --git a/3.12-minimal/test/run-pytest b/3.12-minimal/test/run-pytest index be66d5a5..e69959ad 100755 --- a/3.12-minimal/test/run-pytest +++ b/3.12-minimal/test/run-pytest @@ -12,4 +12,4 @@ PYTHON_VERSION="3.12" if [[ ! -f "/usr/bin/python$PYTHON_VERSION" ]]; then PYTHON_VERSION="3.13" fi -cd "${THISDIR}" && "python${PYTHON_VERSION}" -m pytest -s -rA --showlocals -vv test_container_b*.py +cd "${THISDIR}" && "python${PYTHON_VERSION}" -m pytest -s -rA --showlocals -vv test_container_*.py diff --git a/3.12/test/run-pytest b/3.12/test/run-pytest index be66d5a5..e69959ad 100755 --- a/3.12/test/run-pytest +++ b/3.12/test/run-pytest @@ -12,4 +12,4 @@ PYTHON_VERSION="3.12" if [[ ! -f "/usr/bin/python$PYTHON_VERSION" ]]; then PYTHON_VERSION="3.13" fi -cd "${THISDIR}" && "python${PYTHON_VERSION}" -m pytest -s -rA --showlocals -vv test_container_b*.py +cd "${THISDIR}" && "python${PYTHON_VERSION}" -m pytest -s -rA --showlocals -vv test_container_*.py diff --git a/3.13-minimal/test/run-pytest b/3.13-minimal/test/run-pytest index be66d5a5..e69959ad 100755 --- a/3.13-minimal/test/run-pytest +++ b/3.13-minimal/test/run-pytest @@ -12,4 +12,4 @@ PYTHON_VERSION="3.12" if [[ ! -f "/usr/bin/python$PYTHON_VERSION" ]]; then PYTHON_VERSION="3.13" fi -cd "${THISDIR}" && "python${PYTHON_VERSION}" -m pytest -s -rA --showlocals -vv test_container_b*.py +cd "${THISDIR}" && "python${PYTHON_VERSION}" -m pytest -s -rA --showlocals -vv test_container_*.py diff --git a/3.13/test/run-pytest b/3.13/test/run-pytest index be66d5a5..e69959ad 100755 --- a/3.13/test/run-pytest +++ b/3.13/test/run-pytest @@ -12,4 +12,4 @@ PYTHON_VERSION="3.12" if [[ ! -f "/usr/bin/python$PYTHON_VERSION" ]]; then PYTHON_VERSION="3.13" fi -cd "${THISDIR}" && "python${PYTHON_VERSION}" -m pytest -s -rA --showlocals -vv test_container_b*.py +cd "${THISDIR}" && "python${PYTHON_VERSION}" -m pytest -s -rA --showlocals -vv test_container_*.py diff --git a/3.6/test/run-pytest b/3.6/test/run-pytest index be66d5a5..e69959ad 100755 --- a/3.6/test/run-pytest +++ b/3.6/test/run-pytest @@ -12,4 +12,4 @@ PYTHON_VERSION="3.12" if [[ ! -f "/usr/bin/python$PYTHON_VERSION" ]]; then PYTHON_VERSION="3.13" fi -cd "${THISDIR}" && "python${PYTHON_VERSION}" -m pytest -s -rA --showlocals -vv test_container_b*.py +cd "${THISDIR}" && "python${PYTHON_VERSION}" -m pytest -s -rA --showlocals -vv test_container_*.py diff --git a/3.9-minimal/test/run-pytest b/3.9-minimal/test/run-pytest index be66d5a5..e69959ad 100755 --- a/3.9-minimal/test/run-pytest +++ b/3.9-minimal/test/run-pytest @@ -12,4 +12,4 @@ PYTHON_VERSION="3.12" if [[ ! -f "/usr/bin/python$PYTHON_VERSION" ]]; then PYTHON_VERSION="3.13" fi -cd "${THISDIR}" && "python${PYTHON_VERSION}" -m pytest -s -rA --showlocals -vv test_container_b*.py +cd "${THISDIR}" && "python${PYTHON_VERSION}" -m pytest -s -rA --showlocals -vv test_container_*.py diff --git a/3.9/test/run-pytest b/3.9/test/run-pytest index be66d5a5..e69959ad 100755 --- a/3.9/test/run-pytest +++ b/3.9/test/run-pytest @@ -12,4 +12,4 @@ PYTHON_VERSION="3.12" if [[ ! -f "/usr/bin/python$PYTHON_VERSION" ]]; then PYTHON_VERSION="3.13" fi -cd "${THISDIR}" && "python${PYTHON_VERSION}" -m pytest -s -rA --showlocals -vv test_container_b*.py +cd "${THISDIR}" && "python${PYTHON_VERSION}" -m pytest -s -rA --showlocals -vv test_container_*.py diff --git a/test/run-pytest b/test/run-pytest index be66d5a5..e69959ad 100755 --- a/test/run-pytest +++ b/test/run-pytest @@ -12,4 +12,4 @@ PYTHON_VERSION="3.12" if [[ ! -f "/usr/bin/python$PYTHON_VERSION" ]]; then PYTHON_VERSION="3.13" fi -cd "${THISDIR}" && "python${PYTHON_VERSION}" -m pytest -s -rA --showlocals -vv test_container_b*.py +cd "${THISDIR}" && "python${PYTHON_VERSION}" -m pytest -s -rA --showlocals -vv test_container_*.py diff --git a/test/test_container_basics.py b/test/test_container_basics.py index a2160e4b..d52e5cd6 100644 --- a/test/test_container_basics.py +++ b/test/test_container_basics.py @@ -116,33 +116,32 @@ def test_minimal_dockerfiles(self): # sclorg/python-39-minimal-c9s / sclorg/python-39-c9s # ubi8/python-39-minimal / ubi8/python-39 full_image_name = VARS.IMAGE_NAME.replace("-minimal", "") - is_pulled = PodmanCLIWrapper.podman_pull_image(image_name=full_image_name) - if not is_pulled: - assert pytest.skip( - f"[SKIP] Multistage build from Dockerfile - '{full_image_name}' does not exists." - ) - - dockerfile_image_name = ContainerTestLibUtils.update_dockerfile( - dockerfile=VARS.TEST_DIR / "from-dockerfile/mod_wsgi.Dockerfile.tpl", - original_string="#IMAGE_NAME#", - string_to_replace=VARS.IMAGE_NAME, - ) - dockerfile = ContainerTestLibUtils.update_dockerfile( - dockerfile=dockerfile_image_name, - original_string="#FULL_IMAGE_NAME#", - string_to_replace=full_image_name, - ) - assert self.app.build_test_container( - dockerfile=dockerfile, - app_url=VARS.TEST_DIR / "micropipenv-requirements-test-app", - app_dir="app-src", - app_image_name="micropipenv-requirements-test-app", - ) - assert self.app.test_app_dockerfile() - cip = self.app.get_cip(cid_file_name="micropipenv-requirements-test-app") - assert cip - assert self.app.test_response( - url=cip, - expected_output="Hello World from mod_wsgi hosted WSGI application!", - debug=True, + is_pulled = PodmanCLIWrapper.podman_pull_image( + image_name=full_image_name, loops=1 ) + print(f"Is image {full_image_name} pulled? {is_pulled}") + if is_pulled: + dockerfile_image_name = ContainerTestLibUtils.update_dockerfile( + dockerfile=VARS.TEST_DIR / "from-dockerfile/mod_wsgi.Dockerfile.tpl", + original_string="#IMAGE_NAME#", + string_to_replace=VARS.IMAGE_NAME, + ) + dockerfile = ContainerTestLibUtils.update_dockerfile( + dockerfile=dockerfile_image_name, + original_string="#FULL_IMAGE_NAME#", + string_to_replace=full_image_name, + ) + assert self.app.build_test_container( + dockerfile=dockerfile, + app_url=VARS.TEST_DIR / "micropipenv-requirements-test-app", + app_dir="app-src", + app_image_name="micropipenv-requirements-test-app", + ) + assert self.app.test_app_dockerfile() + cip = self.app.get_cip(cid_file_name="micropipenv-requirements-test-app") + assert cip + assert self.app.test_response( + url=cip, + expected_output="Hello World from mod_wsgi hosted WSGI application!", + debug=True, + )