From: Colin Vidal Date: Tue, 22 Jul 2025 12:43:26 +0000 (+0200) Subject: update test_hooks system tests X-Git-Tag: v9.21.11~23^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b0061843b77f7cd96022bd9531853b54fd933dc3;p=thirdparty%2Fbind9.git update test_hooks system tests Add the case where the plugin name is provided without the extension in the test_hooks system tests. --- diff --git a/bin/tests/system/hooks/ns1/named.conf.j2 b/bin/tests/system/hooks/ns1/named.conf.j2 index 0cc4387cf1c..905028ce077 100644 --- a/bin/tests/system/hooks/ns1/named.conf.j2 +++ b/bin/tests/system/hooks/ns1/named.conf.j2 @@ -10,6 +10,7 @@ * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ +{% set noextension = noextension | default(False) %} options { query-source address 10.53.0.1; @@ -24,8 +25,11 @@ options { minimal-responses no; }; - +{% if noextension %} +plugin query "@TOP_BUILDDIR@/testlib-driver-async"; +{% else %} plugin query "@TOP_BUILDDIR@/testlib-driver-async.@DYLIB@"; +{% endif %} key rndc_key { secret "1234abcd8765"; diff --git a/bin/tests/system/hooks/tests_async_plugin.py b/bin/tests/system/hooks/tests_hooks.py similarity index 72% rename from bin/tests/system/hooks/tests_async_plugin.py rename to bin/tests/system/hooks/tests_hooks.py index ac89c85ac00..b5391ee46a1 100644 --- a/bin/tests/system/hooks/tests_async_plugin.py +++ b/bin/tests/system/hooks/tests_hooks.py @@ -16,8 +16,16 @@ pytest.importorskip("dns") import dns.message -def test_async_hook(): +def test_hooks(): msg = dns.message.make_query("example.com.", "A") res = isctest.query.udp(msg, "10.53.0.1") # the test-async plugin changes the status of any positive answer to NOTIMP isctest.check.notimp(res) + + +def test_hooks_noextension(ns1, templates): + templates.render("ns1/named.conf", {"noextension": True}) + with ns1.watch_log_from_here() as watcher: + ns1.rndc("reload") + watcher.wait_for_line("all zones loaded") + test_hooks()