~/talk

Testing Container Images with Python and Pytest

Talkat DevConf.CZ 2023 · 2023-06-16..06-18· [testing, python]
slides:none on file

pytest_container is a pytest plugin that actually pulls, builds, launches and destroys images for tests, exposes a connection to run Testinfra checks, and auto pull/build/launch/cleanup of containers and volumes (including removing anonymous volumes). It finds free host ports and binds them, supports Docker and Podman selectable by env var, can create pods and shared networks, defaults to reusing containers but offers container-per-test, and waits for container health checks before running tests.

AI-written summary · about

  1. 0:00Introduction
  2. 0:41Python and pytest for container testing
  3. 1:47pytest-container plugin features
  4. 3:54Test case with openSUSE Tumbleweed
  5. 5:19Practical container testing
  6. 6:45Building derived images
  7. 7:26Port binding in parallel tests
  8. 8:08Podman pods setup
  9. 9:09Container cleanup and isolation
  10. 9:52Parameterizing container tests
  11. 10:33Inspecting container properties
  12. 11:16Bind mounts and volumes
  13. 11:37Health checks and readiness
  14. 12:42Docker versus Podman
  15. 13:02Parallel execution and cleanup
  16. 13:46Projects and acknowledgments
  17. 14:26Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.