File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -84,6 +84,41 @@ tox -e py -- --pnext -m pnext podman/tests/integration/test_container_create.py
8484The option ` --pnext ` ** enables** the tests with the ` pnext ` pytest marker, and ` -m pnext ` will run
8585the marked tests ** only** .
8686
87+ #### Testing version-specific or distro-specific scenarios
88+
89+ Tests can be conditionally skipped based on ` podman ` 's version or on the host
90+ that's running the test suite.
91+
92+ ``` python
93+ from podman.tests.utils import OS_RELEASE , PODMAN_VERSION
94+
95+
96+ @pytest.mark.skipif (
97+ PODMAN_VERSION < (5 , 6 , 0 ),
98+ reason = " Feature introduced in Podman 5.6.0 https://github.com/..." ,
99+ )
100+ @pytest.mark.skipif (
101+ OS_RELEASE [" ID" ] == " fedora" and int (OS_RELEASE [" VERSION_ID" ]) < 42 ,
102+ reason = " Feature patched in F42 or later https://github.com/..." ,
103+ )
104+ ```
105+
106+ #### Common test issues
107+
108+ Tests work by establishing a ssh connection with localhost. If you see
109+ this line repeating after launching tox you might need to fix your ssh to be
110+ able to connect locally.
111+
112+ ``` log
113+ ...
114+ 2025-09-25 13:20:44 [ DEBUG] Waiting on /run/user/1000/podman/podman-forward-a65fd89525a248608d4c.sock (ssh.py:89)
115+ 2025-09-25 13:20:44 [ DEBUG] Waiting on /run/user/1000/podman/podman-forward-a65fd89525a248608d4c.sock (ssh.py:89)
116+ ...
117+ ```
118+
119+ Most of the times, if you can run ` ssh localhost exit ` successfully your tests
120+ will run.
121+
87122## Submitting changes
88123
89124- Create a github pull request (PR)
You can’t perform that action at this time.
0 commit comments