]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add all env vars to jinja2 templates
authorNicki Křížek <nicki@isc.org>
Tue, 26 Nov 2024 13:29:42 +0000 (14:29 +0100)
committerMichal Nowak <mnowak@isc.org>
Tue, 26 Nov 2024 16:10:27 +0000 (16:10 +0000)
Ensure that the jinja2 templates have all the environment variables
which are available to the tests present.

This omission during the original 9.18 backport caused an issue where
port numbers (determined by the pytest framework) wouldn't be available
in jinja2 templates.

bin/tests/system/conftest.py

index bc17f000aed4cdd55947b0557ae7b5a31596c9d2..37a26bb5496a44a4707dade6633537c860f98d41 100644 (file)
@@ -521,8 +521,8 @@ def system_test_dir(request, env, system_test_name, expected_artifacts):
 
 
 @pytest.fixture(scope="module")
-def templates(system_test_dir: Path):
-    return isctest.template.TemplateEngine(system_test_dir)
+def templates(system_test_dir: Path, env):
+    return isctest.template.TemplateEngine(system_test_dir, env)
 
 
 def _run_script(