]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Use jinja2 templates in checkzone test
authorNicki Křížek <nicki@isc.org>
Fri, 5 Dec 2025 14:26:32 +0000 (15:26 +0100)
committerNicki Křížek <nicki@isc.org>
Tue, 9 Dec 2025 13:23:14 +0000 (14:23 +0100)
Render the bad-tsig.db file using jinja2 template to get rid of
copy_setports.

Since the zone is using @ character, use the raw directive to avoid
interpreting it as a variable start.

bin/tests/system/checkzone/setup.sh
bin/tests/system/checkzone/zones/bad-tsig.db.j2 [moved from bin/tests/system/checkzone/zones/bad-tsig.db.in with 96% similarity]

index a48aa5937bfd17e96c04997aa20a95d71860cecf..8c3cd39dc0c945f4c2a34e11d0f4b8f0a2e79809 100644 (file)
@@ -17,5 +17,3 @@ ln -s $CHECKZONE named-compilezone
 
 ./named-compilezone -D -F raw -o good1.db.raw example \
   zones/good1.db >/dev/null 2>&1
-
-copy_setports zones/bad-tsig.db.in zones/bad-tsig.db
similarity index 96%
rename from bin/tests/system/checkzone/zones/bad-tsig.db.in
rename to bin/tests/system/checkzone/zones/bad-tsig.db.j2
index daef06c3943ea562ce340a38e638c7cd6fa7320d..ea8042c3e3dec517f0973fae2128b4afbe8fbcda 100644 (file)
@@ -9,9 +9,11 @@
 ; See the COPYRIGHT file distributed with this work for additional
 ; information regarding copyright ownership.
 
+{% raw %}
 $TTL 600
 @              SOA     ns hostmaster 2011012708 3600 1200 604800 1200
                NS      ns
 ns             A       192.0.2.1
+{% endraw %}
 
 tsig           TSIG    @DEFAULT_HMAC@ 1516135665 300 20 thBt8DheAD7qpqSFTiGK999sxGg= 54994 NOERROR 0