Skip to content

Conversation

@phracek
Copy link
Member

@phracek phracek commented Nov 11, 2025

This pull request migrates bash test suite
to container-ci-suite stored here: https://github.org/sclorg/container-ci-suite

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 phracek@redhat.com

phracek added a commit to phracek/s2i-python-container that referenced this pull request Nov 11, 2025
This blocks: sclorg#768

Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
phracek added a commit that referenced this pull request Nov 11, 2025
This blocks: #768

Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
@phracek
Copy link
Member Author

phracek commented Nov 11, 2025

Rebased against master. Let's run first round of tests.
[test][test-pytest][test-openshift-pytest]

@github-actions
Copy link

github-actions bot commented Nov 11, 2025

Testing Farm results

namecomposearchstatusstarted (UTC)timelogs
RHEL8 - PyTest - OpenShift 4 - 3.12RHEL-8.10.0-Nightlyx86_64✅ passed18.11.2025 13:51:4426min 23stest pipeline
RHEL8 - PyTest - OpenShift 4 - 3.9RHEL-8.10.0-Nightlyx86_64✅ passed18.11.2025 13:51:4424min 56stest pipeline
RHEL8 - 3.9-minimalRHEL-8.10.0-Nightlyx86_64✅ passed18.11.2025 14:08:0124min 43stest pipeline
RHEL8 - PyTest - 3.11RHEL-8.10.0-Nightlyx86_64✅ passed18.11.2025 14:14:1922min 6stest pipeline
RHEL8 - PyTest - OpenShift 4 - 3.12-minimalRHEL-8.10.0-Nightlyx86_64✅ passed18.11.2025 13:51:4823min 53stest pipeline
RHEL8 - PyTest - 3.9RHEL-8.10.0-Nightlyx86_64✅ passed18.11.2025 14:14:2220min 38stest pipeline
RHEL8 - PyTest - 3.12-minimalRHEL-8.10.0-Nightlyx86_64✅ passed18.11.2025 14:31:2220min 48stest pipeline
RHEL10 - PyTest - OpenShift 4 - 3.12-minimalRHEL-10-Nightlyx86_64❌ error19.11.2025 08:24:4714min 53stest pipeline
RHEL8 - PyTest - OpenShift 4 - 3.11RHEL-8.10.0-Nightlyx86_64✅ passed18.11.2025 13:51:4525min 12stest pipeline
RHEL10 - PyTest - 3.12-minimalRHEL-10-Nightlyx86_64❌ error19.11.2025 08:26:5114min 38stest pipeline
RHEL8 - PyTest - 3.9-minimalRHEL-8.10.0-Nightlyx86_64✅ passed18.11.2025 14:48:5620min 27stest pipeline
RHEL9 - PyTest - OpenShift 4 - 3.12RHEL-9.6.0-Nightlyx86_64✅ passed18.11.2025 13:51:4431min 10stest pipeline
RHEL8 - PyTest - 3.11-minimalRHEL-8.10.0-Nightlyx86_64✅ passed18.11.2025 14:24:3122min 7stest pipeline
RHEL9 - 3.9RHEL-9.6.0-Nightlyx86_64✅ passed18.11.2025 13:51:5130min 25stest pipeline
RHEL9 - 3.12-minimalRHEL-9.6.0-Nightlyx86_64✅ passed18.11.2025 14:29:3228min 8stest pipeline
RHEL9 - PyTest - 3.12-minimalRHEL-9.6.0-Nightlyx86_64✅ passed18.11.2025 14:44:4424min 11stest pipeline
RHEL9 - PyTest - OpenShift 4 - 3.12-minimalRHEL-9.6.0-Nightlyx86_64✅ passed18.11.2025 17:13:2529min 5stest pipeline
RHEL9 - PyTest - OpenShift 4 - 3.11RHEL-9.6.0-Nightlyx86_64✅ passed18.11.2025 13:51:4630min 7stest pipeline
RHEL8 - 3.11RHEL-8.10.0-Nightlyx86_64✅ passed18.11.2025 14:36:5527min 32stest pipeline
RHEL9 - PyTest - 3.9RHEL-9.6.0-Nightlyx86_64✅ passed18.11.2025 13:52:0825min 16stest pipeline
RHEL9 - PyTest - OpenShift 4 - 3.9RHEL-9.6.0-Nightlyx86_64✅ passed18.11.2025 17:13:2329min 56stest pipeline
RHEL9 - PyTest - 3.11RHEL-9.6.0-Nightlyx86_64✅ passed18.11.2025 14:44:4726min 48stest pipeline
RHEL8 - 3.12RHEL-8.10.0-Nightlyx86_64✅ passed18.11.2025 14:37:2727min 10stest pipeline
RHEL8 - 3.12-minimalRHEL-8.10.0-Nightlyx86_64✅ passed18.11.2025 13:51:5126min 17stest pipeline
RHEL10 - 3.12-minimalRHEL-10-Nightlyx86_64❌ error19.11.2025 08:24:5114min 35stest pipeline
CentOS Stream 9 - PyTest - 3.9CentOS-Stream-9x86_64✅ passed18.11.2025 14:24:1817min 40stest pipeline
CentOS Stream 10 - PyTest - 3.12-minimalCentOS-Stream-10x86_64❌ error19.11.2025 08:26:5013min 32stest pipeline
CentOS Stream 9 - PyTest - 3.11-minimalCentOS-Stream-9x86_64✅ passed18.11.2025 14:18:5215min 10stest pipeline
CentOS Stream 9 - PyTest - 3.12-minimalCentOS-Stream-9x86_64✅ passed18.11.2025 14:41:0616min 18stest pipeline
CentOS Stream 10 - 3.12CentOS-Stream-10x86_64✅ passed18.11.2025 14:30:3319min 36stest pipeline
RHEL9 - PyTest - 3.12RHEL-9.6.0-Nightlyx86_64✅ passed18.11.2025 13:51:5526min 6stest pipeline
RHEL8 - PyTest - 3.12RHEL-8.10.0-Nightlyx86_64✅ passed18.11.2025 14:49:0920min 57stest pipeline
RHEL8 - 3.11-minimalRHEL-8.10.0-Nightlyx86_64✅ passed18.11.2025 14:38:5125min 18stest pipeline
RHEL8 - 3.9RHEL-8.10.0-Nightlyx86_64✅ passed18.11.2025 14:36:3927min 3stest pipeline
Fedora - PyTest - 3.13Fedora-latestx86_64✅ passed18.11.2025 14:20:4714min 37stest pipeline
CentOS Stream 9 - PyTest - 3.9-minimalCentOS-Stream-9x86_64✅ passed18.11.2025 14:42:4014min 58stest pipeline
CentOS Stream 10 - PyTest - 3.12CentOS-Stream-10x86_64✅ passed18.11.2025 14:08:2116min 3stest pipeline
CentOS Stream 9 - 3.12-minimalCentOS-Stream-9x86_64✅ passed18.11.2025 13:51:5220min 9stest pipeline
RHEL9 - 3.11RHEL-9.6.0-Nightlyx86_64✅ passed18.11.2025 17:13:3429min 53stest pipeline
RHEL9 - 3.12RHEL-9.6.0-Nightlyx86_64✅ passed18.11.2025 14:34:2930min 39stest pipeline
CentOS Stream 9 - PyTest - 3.11CentOS-Stream-9x86_64✅ passed18.11.2025 13:51:5517min 36stest pipeline
CentOS Stream 9 - PyTest - 3.12CentOS-Stream-9x86_64✅ passed18.11.2025 14:46:3218min 38stest pipeline
CentOS Stream 9 - 3.9-minimalCentOS-Stream-9x86_64✅ passed18.11.2025 14:28:3419min 46stest pipeline
CentOS Stream 9 - 3.12CentOS-Stream-9x86_64✅ passed18.11.2025 13:51:5321min 24stest pipeline
CentOS Stream 9 - 3.11CentOS-Stream-9x86_64✅ passed18.11.2025 14:26:4622min 50stest pipeline
CentOS Stream 10 - 3.12-minimalCentOS-Stream-10x86_64✅ passed18.11.2025 14:38:5018min 32stest pipeline
CentOS Stream 9 - 3.9CentOS-Stream-9x86_64✅ passed18.11.2025 14:37:1121min 26stest pipeline
Fedora - 3.13Fedora-latestx86_64✅ passed18.11.2025 13:52:0117min 47stest pipeline
RHEL9 - OpenShift 4 - 3.12-minimalRHEL-9.6.0-Nightlyx86_64✅ passed18.11.2025 14:16:2126min 8stest pipeline
RHEL10 - OpenShift 4 - 3.12-minimalRHEL-10-Nightlyx86_64❌ error19.11.2025 08:29:1614min 46stest pipeline
RHEL8 - OpenShift 4 - 3.9RHEL-8.10.0-Nightlyx86_64✅ passed18.11.2025 14:24:0721min 48stest pipeline
RHEL9 - OpenShift 4 - 3.9RHEL-9.6.0-Nightlyx86_64✅ passed18.11.2025 14:18:1925min 23stest pipeline
RHEL9 - OpenShift 4 - 3.12RHEL-9.6.0-Nightlyx86_64✅ passed18.11.2025 14:10:2527min 17stest pipeline
RHEL9 - OpenShift 4 - 3.11RHEL-9.6.0-Nightlyx86_64✅ passed18.11.2025 14:22:1828min 1stest pipeline
RHEL8 - OpenShift 4 - 3.12-minimalRHEL-8.10.0-Nightlyx86_64✅ passed18.11.2025 14:10:1418min 28stest pipeline
RHEL8 - OpenShift 4 - 3.12RHEL-8.10.0-Nightlyx86_64✅ passed18.11.2025 14:10:4118min 23stest pipeline
RHEL8 - OpenShift 4 - 3.11RHEL-8.10.0-Nightlyx86_64✅ passed18.11.2025 14:18:4821min 44stest pipeline
CentOS Stream 9 - 3.11-minimalCentOS-Stream-9x86_64✅ passed18.11.2025 13:52:0619min 51stest pipeline
Fedora - 3.13-minimalFedora-latestx86_64✅ passed18.11.2025 14:09:2016min 25stest pipeline
CentOS Stream 10 - 3.13CentOS-Stream-10x86_64✅ passed18.11.2025 14:35:0920min 56stest pipeline
CentOS Stream 10 - PyTest - 3.13CentOS-Stream-10x86_64✅ passed18.11.2025 14:50:4318min 12stest pipeline

@phracek
Copy link
Member Author

phracek commented Nov 11, 2025

RHEL8 failures are caused by CDN errors:

[MIRROR] libffi-devel-3.1-24.el8.x86_64.rpm: Curl error (28): Timeout was reached for https://stagecdn.redhat.com/content/dist/rhel8/8/x86_64/baseos/os/Packages/l/libffi-devel-3.1-24.el8.x86_64.rpm [Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds]
[MIRROR] hunspell-en-0.20140811.1-12.el8.noarch.rpm: Curl error (56): Failure when receiving data from the peer for https://stagecdn.redhat.com/content/dist/rhel8/8/x86_64/appstream/os/Packages/h/hunspell-en-0.20140811.1-12.el8.noarch.rpm [Received HTTP code 503 from proxy after CONNECT]
[MIRROR] libtalloc-2.4.1-0.el8.x86_64.rpm: Curl error (28): Timeout was reached for https://stagecdn.redhat.com/content/dist/rhel8/8/x86_64/baseos/os/Packages/l/libtalloc-2.4.1-0.el8.x86_64.rpm [Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds]
[MIRROR] openldap-devel-2.4.46-21.el8_10.x86_64.rpm: Curl error (28): Timeout was reached for https://stagecdn.redhat.com/content/dist/rhel8/8/x86_64/baseos/os/Packages/o/openldap-devel-2.4.46-21.el8_10.x86_64.rpm [Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds]
[MIRROR] hunspell-en-GB-0.20140811.1-12.el8.noarch.rpm: Curl error (56): Failure when receiving data from the peer for https://stagecdn.redhat.com/content/dist/rhel8/8/x86_64/appstream/os/Packages/h/hunspell-en-GB-0.20140811.1-12.el8.noarch.rpm [Received HTTP code 503 from proxy after CONNECT]
[MIRROR] libffi-devel-3.1-24.el8.x86_64.rpm: Curl error (56): Failure when receiving data from the peer for https://stagecdn.redhat.com/content/dist/rhel8/8/x86_64/baseos/os/Packages/l/libffi-devel-3.1-24.el8.x86_64.rpm [Received HTTP code 503 from proxy after CONNECT]
[FAILED] libffi-devel-3.1-24.el8.x86_64.rpm: No more mirrors to try - All mirrors were already tried without success

The downloaded packages were saved in cache until the next successful t

@phracek
Copy link
Member Author

phracek commented Nov 12, 2025

[test][test-all]

@phracek
Copy link
Member Author

phracek commented Nov 13, 2025

The new container-ci-suite was released. Let's re-test it.

[test-all]

@phracek
Copy link
Member Author

phracek commented Nov 13, 2025

Python failures are:

C10S - PyTest - 3.12-minimal:

[notice] A new release of pip is available: 24.2 -> 25.3
[notice] To update, run: pip install --upgrade pip
--> 04db29fbc4be
[2/2] STEP 1/6: FROM quay.io/sclorg/python-312-minimal-c10s:3.12-minimal
[2/2] STEP 2/6: COPY --from=builder $APP_ROOT $APP_ROOT
--> 8b1aba1b0f19
[2/2] STEP 3/6: USER 0
--> 8f0c8050bef9
[2/2] STEP 4/6: RUN microdnf install -y httpd enchant
Downloading metadata...
Downloading metadata...
Downloading metadata...
error: No package matches 'enchant'
Error: building at STEP "RUN microdnf install -y httpd enchant": while running runtime: exit status 1

It caused, I guess, main image should not be pulled. C10S - 3.12 should not be exists in quay.io/sclorg/python-312-c10s. RHEL10 does not exists.

Fedora PyTest - 3.13 - test_container_basics.py::TestS2IPythonContainer::test_dockerfiles[Dockerfile.tpl] INFO:Image name to test: quay.io/fedora/python3-313:3.13

Downloading setuptools-80.9.0-py3-none-any.whl (1.2 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 428.5 MB/s eta 0:00:00
Building wheels for collected packages: psycopg2-binary
  Building wheel for psycopg2-binary (pyproject.toml): started
  Building wheel for psycopg2-binary (pyproject.toml): finished with status 'error'
  error: subprocess-exited-with-error
  
  × Building wheel for psycopg2-binary (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [115 lines of output]
      /tmp/pip-build-env-jyymjeu8/overlay/lib/python3.13/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
      !!
      
              ********************************************************************************
              Please consider removing the following classifiers in favor of a SPDX license expression:
      
              License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)
      
              See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
              ********************************************************************************
      
      !!
        self._finalize_license_expression()
      running bdist_wheel
      running build
      running build_py
      creating build/lib.linux-x86_64-cpython-313/psycopg2
  

RHEL8 - 3.11 and RHEL9-PyTest-3.11

[notice] To update, run: python3.11 -m pip install --upgrade pip
---> Installing dependencies via pipenv ...
Courtesy Notice:
Pipenv found itself running within a virtual environment,  so it will 
automatically use that environment, instead of  creating its own for any 
project. You can set
PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and 
create  its own instead.
You can set PIPENV_VERBOSITY=-1 to suppress this warning.
Installing dependencies from Pipfile.lock (63c7a0)...
Looking in indexes: https://pypi.python.org/simple
Obtaining file:///opt/app-root/src (from -r 
/tmp/pipenv-48jubp3a-requirements/pipenv-7im0x6ci-reqs.txt (line 1))
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Checking if build backend supports build_editable: started
  Checking if build backend supports build_editable: finished with status 'done'
ERROR: Exception:
Traceback (most recent call last):
  File 
"/opt/app-root/src/.local/venvs/pipenv/lib/python3.11/site-packages/pipenv/patch
ed/pip/_internal/cli/base_command.py", line 105, in _run_wrapper
    status = _inner_run()
             ^^^^^^^^^^^^
  File 
"/opt/app-root/src/.local/venvs/pipenv/lib/python3.11/site-packages/pipenv/patch
ed/pip/_internal/cli/base_command.py", line 96, in _inner_run
    return self.run(options, args)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File 
"/opt/app-root/src/.local/venvs/pipenv/lib/python3.11/site-packages/pipenv/patch
ed/pip/_internal/cli/req_command.py", line 68, in wrapper
    return func(self, options, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File 

@frenzymadness
Copy link
Member

It caused, I guess, main image should not be pulled. C10S - 3.12 should not be exists in quay.io/sclorg/python-312-c10s. RHEL10 does not exists.

I don't understand this sentence, sorry. We have dockerfiles here for 3.12 and 3.12-minimal based on C10S.

Fedora PyTest - 3.13 - test_container_basics.py::TestS2IPythonContainer::test_dockerfiles[Dockerfile.tpl] INFO:Image name to test: quay.io/fedora/python3-313:3.13

The version of psycopg2-binary I see in the logs indicates that this test used django-ex branch 3.2.x and that's incorrect. New Pythons like 3.13 should use Django version/branch 4.2.x that has newer psycopg2-binary dependency and that new version provides wheels for Python 3.13.

RHEL8 - 3.11 and RHEL9-PyTest-3.11

I need more time to investigate the last one. I'm not able to reproduce locally so I need to build the container image first.

Also VARS.* variables are used during the migration.

Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
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 <phracek@redhat.com>
Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Add distgen generated files

Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Fix proper branch in `test_dockerfiles` function.

Add test suite to Class and build application once.

Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
@phracek
Copy link
Member Author

phracek commented Nov 18, 2025

I have fixed some issues. Let's re-run tests again
[test-all]

Copy link
Member

@frenzymadness frenzymadness left a comment

Choose a reason for hiding this comment

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

It looks good overall. Just a few nitpicks.

UNSTABLE_WEB_APP = [
"pipenv-test-app",
]
MINIMAL_WEB_APPS: list[Path] = []
Copy link
Member

Choose a reason for hiding this comment

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

Unused variable.

pytest.skip("Skipping tests 'test_dockerfiles' for minimal versions.")
assert self.app.build_test_container(
dockerfile=VARS.TEST_DIR / "from-dockerfile" / dockerfile,
app_url="https://github.com/sclorg/django-ex.git@4.2.x",
Copy link
Member

Choose a reason for hiding this comment

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

BRANCH_TO_TEST instead of the hardcoded Django version?

image_name=full_image_name, loops=1
)
print(f"Is image {full_image_name} pulled? {is_pulled}")
if is_pulled:
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this part just fail when we are unable to pull the full image and therefore run the tests?

@frenzymadness
Copy link
Member

Let me know if you want me to take a look at the results of the failed tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants