2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

Update pytest how to for BIND system tests: add fixture reference

Petr Špaček
2025-07-08 15:26:24 +00:00
parent 9ea245a926
commit f4c08b74ff

@@ -1,6 +1,7 @@
--- ---
title: pytest how-to for BIND system tests title: pytest how-to for BIND system tests
--- ---
See [[/bin/tests/system/README|/../blob/main/bin/tests/system/README.md]] first See [[/bin/tests/system/README|/../blob/main/bin/tests/system/README.md]] first
# Debugging # Debugging
@@ -8,3 +9,6 @@ See [[/bin/tests/system/README|/../blob/main/bin/tests/system/README.md]] first
- If test hangs on startup or exits one minute after start - most probably servers did not start. That's typically a config error. - If test hangs on startup or exits one minute after start - most probably servers did not start. That's typically a config error.
- `pytest --log-level DEBUG` should show which server does not respond to TCP queries - `pytest --log-level DEBUG` should show which server does not respond to TCP queries
- See also `pytest.log.txt` in directory with artifacts. - See also `pytest.log.txt` in directory with artifacts.
# Magic variables
Pytest has framework for providing 'context' to tests in a consistent manner. Their term for it is 'fixture' and it manifests itself as a function parameter with name which is nowhere to be found. See https://docs.pytest.org/en/7.1.x/explanation/fixtures.html