]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Extend test_hooks_zonetemplate2 test 12365/head
authorMark Andrews <marka@isc.org>
Wed, 8 Jul 2026 02:19:28 +0000 (12:19 +1000)
committerMark Andrews <marka@isc.org>
Tue, 14 Jul 2026 22:02:33 +0000 (08:02 +1000)
The test_hooks_zonetemplate2 test failed to properly check
first label matches.

bin/tests/system/hooks/tests_hooks.py

index 247ac9a10b8e16db3cc3a53c8ce1c10e72d32143..5c638a07daefc494fedb455af1dbf94549493079 100644 (file)
@@ -72,6 +72,16 @@ def test_hooks_zonetemplate2():
     res = isctest.query.udp(msg, "10.53.0.2")
     isctest.check.rcode(res, dns.rcode.NOTZONE)
 
+    # test that the skip label is not matched add suffix
+    msg = isctest.query.create("skipfooX.example4.com", "A")
+    res = isctest.query.udp(msg, "10.53.0.2")
+    isctest.check.rcode(res, dns.rcode.NOTAUTH)
+
+    # test that the skip label is not matched add prefix
+    msg = isctest.query.create("Xskipfoo.example4.com", "A")
+    res = isctest.query.udp(msg, "10.53.0.2")
+    isctest.check.rcode(res, dns.rcode.NOTAUTH)
+
 
 def test_hooks_zone_rndc_reload(servers):
     ns2 = servers["ns2"]