From: Nicki Křížek Date: Thu, 31 Oct 2024 09:40:02 +0000 (+0000) Subject: new: dev: Support jinja2 templates in pytest runner X-Git-Tag: v9.21.3~53 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=04bdaf6efbad52413e3eca7d48aabc7b512ed4f3;p=thirdparty%2Fbind9.git new: dev: Support jinja2 templates in pytest runner Configuration files in system tests which require some variables (e.g. port numbers) filled in during test setup, can now use jinja2 templates when `jinja2` python package is available. Any `*.j2` file found within the system test directory will be automatically rendered with the environment variables into a file without the `.j2` extension by the pytest runner. E.g. `ns1/named.conf.j2` will become `ns1/named.conf` during test setup. To avoid automatic rendering, use `.j2.manual` extension and render the files manually at test time. New `templates` pytest fixture has been added. Its `render()` function can be used to render a template with custom test variables. This can be useful to fill in different config options during the test. With advanced jinja2 template syntax, it can also be used to include/omit entire sections of the config file rather than using `named1.conf.in`, `named2.conf.in` etc. Closes #4938 Merge branch '4938-use-jinja2-templates-in-system-tests' into 'main' See merge request isc-projects/bind9!9587 --- 04bdaf6efbad52413e3eca7d48aabc7b512ed4f3