mirror of
https://github.com/containers/podman.git
synced 2025-09-27 00:34:32 +08:00
Fix python dockerpy tests
* Refactor packaging so unittest discovery works * Refactor tests to use python3-docker.rpm that ships with Fedora32 * Flush image cache between tests suites * Update documentation to reflect changes Outstanding issue: * client.get_image() does not fail if image does not exist Signed-off-by: Jhon Honce <jhonce@redhat.com>
This commit is contained in:
40
test/python/dockerpy/README.md
Normal file
40
test/python/dockerpy/README.md
Normal file
@ -0,0 +1,40 @@
|
||||
# Dockerpy regression test
|
||||
|
||||
Python test suite to validate Podman endpoints using dockerpy library
|
||||
|
||||
## Running Tests
|
||||
|
||||
To run the tests locally in your sandbox (Fedora 32):
|
||||
|
||||
```shell script
|
||||
# dnf install python3-docker
|
||||
```
|
||||
|
||||
### Run the entire test suite
|
||||
|
||||
```shell
|
||||
# cd test/python/dockerpy
|
||||
# PYTHONPATH=/usr/bin/python python -m unittest discover .
|
||||
```
|
||||
|
||||
Passing the -v option to your test script will instruct unittest.main() to enable a higher level of verbosity, and produce detailed output:
|
||||
|
||||
```shell
|
||||
# cd test/python/dockerpy
|
||||
# PYTHONPATH=/usr/bin/python python -m unittest -v discover .
|
||||
```
|
||||
|
||||
### Run a specific test class
|
||||
|
||||
```shell
|
||||
# cd test/python/dockerpy
|
||||
# PYTHONPATH=/usr/bin/python python -m unittest -v tests.test_images
|
||||
```
|
||||
|
||||
### Run a specific test within the test class
|
||||
|
||||
```shell
|
||||
# cd test/python/dockerpy
|
||||
# PYTHONPATH=/usr/bin/python python -m unittest tests.test_images.TestImages.test_import_image
|
||||
|
||||
```
|
Reference in New Issue
Block a user