Skip to content

Conversation

@phracek
Copy link
Member

@phracek phracek commented Sep 29, 2025

This pull request adds support for testing container by PyTest suite.

New test files are added:

  • test/run-pytest .. that runs PyTest alone
  • test/test_container_basics.py
  • test/test_container_s2i.py

All files are added as symlinks to each version.

Migration matrix is:

  • test_sample_test_app -> test_container_s2i.py class TestPerlSampleTestAppContainer
  • test_binpath -> test_container_s2i.py parametrized TestPerlExampleAppContainer
  • test_psgi -> test_container_s2i.py parametrized TestPerlExampleAppContainer
  • test_fcgi -> test_container_s2i.py parametrized TestPerlExampleAppContainer
  • test_psgi_variables -> test_container_s2i.py parametrized TestPerlExampleAppContainer
  • test_warningonstderr -> test_container_s2i.py parametrized TestPerlExampleAppContainer
  • test_psgi_hot_deploy_without_reload -> test_container_s2i.py parametrized TestPerlHotDeployAppContainer
  • test_psgi_hot_deploy_with_reload -> test_container_s2i.py parametrized TestPerlHotDeployAppContainer
  • test_npm -> test_container_s2i.py parametrized TestPerlNPMtestContainer
  • test_from_dockerfile -> test_container_basics.py class TestPerlContainer
  • test_scl_usage -> test_container_basics.py class TestPerlContainer
  • test_docker_run_usage -> test_container_basics.py class TestPerlContainer
  • test_run_s2i_usage -> test_container_basics.py class TestPerContainer

@github-actions
Copy link

github-actions bot commented Sep 29, 2025

Pull Request validation

Failed

🔴 Failed or pending statuses:

  • Testing Farm - Fedora - PyTest - 5.40[pending]
  • Testing Farm - RHEL8 - OpenShift 4 - 5.26-mod_fcgid[pending]
  • Testing Farm - Fedora - PyTest - 5.36[pending]
  • Testing Farm - RHEL9 - OpenShift 4 - 5.32[pending]
  • Testing Farm - RHEL9 - PyTest - 5.32[pending]
  • Testing Farm - CentOS Stream 10 - PyTest - 5.40[pending]

🔴 Review - Missing review from a member (1 required)

@github-actions
Copy link

github-actions bot commented Sep 30, 2025

Testing Farm results

namecomposearchstatusstarted (UTC)timelogs
Fedora - PyTest - 5.38Fedora-latestx86_64✅ passed16.10.2025 11:47:1316min 4stest pipeline
Fedora - PyTest - 5.36Fedora-latestx86_64✅ passed16.10.2025 10:49:3315min 5stest pipeline
Fedora - PyTest - 5.40Fedora-latestx86_64✅ passed16.10.2025 10:46:0515min 16stest pipeline
CentOS Stream 10 - PyTest - 5.40CentOS-Stream-10x86_64✅ passed16.10.2025 10:54:1516min 46stest pipeline
CentOS Stream 9 - PyTest - 5.32CentOS-Stream-9x86_64✅ passed16.10.2025 11:53:2817min 29stest pipeline
RHEL10 - PyTest - 5.40RHEL-10-Nightlyx86_64✅ passed16.10.2025 11:07:0422min 40stest pipeline
RHEL9 - PyTest - 5.32RHEL-9.6.0-Nightlyx86_64✅ passed16.10.2025 10:52:1525min 29stest pipeline
RHEL8 - PyTest - 5.26-mod_fcgidRHEL-8.10.0-Nightlyx86_64✅ passed16.10.2025 11:39:5625min 54stest pipeline
Fedora - 5.38Fedora-latestx86_64✅ passed13.10.2025 13:57:3416min 15stest pipeline
Fedora - 5.36Fedora-latestx86_64✅ passed13.10.2025 13:46:3614min 33stest pipeline
Fedora - 5.40Fedora-latestx86_64✅ passed13.10.2025 13:21:4614min 27stest pipeline
CentOS Stream 10 - 5.40CentOS-Stream-10x86_64✅ passed13.10.2025 13:15:0417min 25stest pipeline
RHEL10 - OpenShift 4 - 5.40RHEL-10-Nightlyx86_64✅ passed16.10.2025 10:54:3420min test pipeline
CentOS Stream 9 - 5.32CentOS-Stream-9x86_64✅ passed13.10.2025 13:33:3617min 50stest pipeline
RHEL8 - OpenShift 4 - 5.26-mod_fcgidRHEL-8.10.0-Nightlyx86_64✅ passed16.10.2025 10:48:1322min 39stest pipeline
RHEL8 - 5.26-mod_fcgidRHEL-8.10.0-Nightlyx86_64✅ passed13.10.2025 13:11:5324min 51stest pipeline
RHEL9 - OpenShift 4 - 5.32RHEL-9.6.0-Nightlyx86_64✅ passed16.10.2025 14:26:5123min 27stest pipeline
RHEL10 - PyTest - OpenShift 4 - 5.40RHEL-10-Nightlyx86_64✅ passed13.10.2025 13:10:5131min 43stest pipeline
RHEL8 - PyTest - OpenShift 4 - 5.26-mod_fcgidRHEL-8.10.0-Nightlyx86_64✅ passed14.10.2025 06:42:2138min 26stest pipeline
RHEL9 - PyTest - OpenShift 4 - 5.32RHEL-9.6.0-Nightlyx86_64✅ passed13.10.2025 13:14:3638min 49stest pipeline
RHEL10 - 5.40RHEL-10-Nightlyx86_64✅ passed13.10.2025 13:09:4921min 11stest pipeline
RHEL9 - 5.32RHEL-9.6.0-Nightlyx86_64✅ passed13.10.2025 13:10:0628min 5stest pipeline

@phracek
Copy link
Member Author

phracek commented Sep 30, 2025

Let's try first round of tests. RHEL9 and version 5.32 passed

[test-pytest]

@phracek
Copy link
Member Author

phracek commented Oct 9, 2025

This has to be reviewed as from Perl Container point of view as from Python point of view. So 2 approvals are needed.
You can take an inspiration here: sclorg/httpd-container#234

@frenzymadness
Copy link
Member

Before I do a review here, could you please take a look at: sclorg/s2i-python-container#759

You might like some of the improvements I've proposed for Python container and they might be implemented here as well.

@phracek phracek force-pushed the container_pytests branch 2 times, most recently from 8cb6839 to 9eee22a Compare October 13, 2025 08:11
as is mentioned in test/run script.

New test files are added:

    test/run-pytest .. that runs PyTest alone
    test/test_container_basics.py
    test/test_container_s2i.py

All files are added as symlinks to each version.

Migration matrix is:

    test_sample_test_app -> test_container_s2i.py class TestPerlSampleTestAppContainer
    test_binpath -> test_container_s2i.py parametrized TestPerlExampleAppContainer
    test_psgi -> test_container_s2i.py parametrized TestPerlExampleAppContainer
    test_fcgi -> test_container_s2i.py parametrized TestPerlExampleAppContainer
    test_psgi_variables -> test_container_s2i.py parametrized TestPerlExampleAppContainer
    test_warningonstderr -> test_container_s2i.py parametrized TestPerlExampleAppContainer
    test_psgi_hot_deploy_without_reload -> test_container_s2i.py parametrized TestPerlHotDeployAppContainer
    test_psgi_hot_deploy_with_reload -> test_container_s2i.py parametrized TestPerlHotDeployAppContainer
    test_npm -> test_container_s2i.py parametrized TestPerlNPMtestContainer
    test_from_dockerfile -> test_container_basics.py class TestPerlContainer
    test_scl_usage -> test_container_basics.py class TestPerlContainer
    test_docker_run_usage -> test_container_basics.py class TestPerlContainer
    test_run_s2i_usage -> test_container_basics.py class TestPerContainer

Signed-off-by: Petr "Stone" Hracek <[email protected]>
./run-pytest
./test_container_basics.py
./test_container_s2i.py
./conftest.py

Signed-off-by: Petr "Stone" Hracek <[email protected]>
@phracek
Copy link
Member Author

phracek commented Oct 13, 2025

Re-written like it is done in sclorg/s2i-python-container#759

Let's test it
[test-all]

Signed-off-by: Petr "Stone" Hracek <[email protected]>
@phracek
Copy link
Member Author

phracek commented Oct 13, 2025

@frenzymadness The tests have been rewritten based on your small improvements in s2i-python-container.

So PTAL. Not urgent.

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.

Overall, it looks very good to me. Just a few minor comments.

what we tests.

Add description, why sleep(3) is present in HotPlug test

Signed-off-by: Petr "Stone" Hracek <[email protected]>
@phracek
Copy link
Member Author

phracek commented Oct 16, 2025

[test-pytest][test-openshift]

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.

I skimmed through it again, and it looks good to me.

@phracek phracek merged commit 9198fff into master Oct 17, 2025
13 checks passed
@phracek phracek deleted the container_pytests branch October 17, 2025 07:31
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.

3 participants