]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add ans6 blackhole server to notify system test
authorMichal Nowak <mnowak@isc.org>
Tue, 9 Dec 2025 11:47:06 +0000 (12:47 +0100)
committerMichal Nowak <mnowak@isc.org>
Thu, 18 Dec 2025 14:27:17 +0000 (15:27 +0100)
bin/tests/system/notify/ans6/ans.py [new file with mode: 0644]
bin/tests/system/notify/ns3/named.conf.j2
bin/tests/system/notify/tests.sh
bin/tests/system/notify/tests_sh_notify.py

diff --git a/bin/tests/system/notify/ans6/ans.py b/bin/tests/system/notify/ans6/ans.py
new file mode 100644 (file)
index 0000000..6f5346f
--- /dev/null
@@ -0,0 +1,25 @@
+# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+#
+# SPDX-License-Identifier: MPL-2.0
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0.  If a copy of the MPL was not distributed with this
+# file, you can obtain one at https://mozilla.org/MPL/2.0/.
+#
+# See the COPYRIGHT file distributed with this work for additional
+# information regarding copyright ownership.
+
+from isctest.asyncserver import (
+    AsyncDnsServer,
+    IgnoreAllQueries,
+)
+
+
+def main() -> None:
+    server = AsyncDnsServer()
+    server.install_response_handler(IgnoreAllQueries())
+    server.run()
+
+
+if __name__ == "__main__":
+    main()
index 756ec746fc474b9695cc0b0a8b29d8629054e291..2e9ea660714ad8934d554efe21459d7f82597cd8 100644 (file)
@@ -45,7 +45,7 @@ zone "example" {
        primaries { 10.53.0.2; };
        file "example.bk";
        # non-responsive notify recipient (no reply, no ICMP errors)
-       also-notify { 10.53.10.53; };
+       also-notify { 10.53.0.6; };
 };
 
 zone "notify-source-port-test" {
index 30c3d3e73625909301e763ceb2b8b7283d0dbe53..05a9aa828096844aa4c221768a0361a654a5a2aa 100644 (file)
@@ -222,7 +222,7 @@ grep "sending notify to 10.53.0.5#[0-9]* : TSIG (b)" ns5/named.run >/dev/null ||
 grep "sending notify to 10.53.0.5#[0-9]* : TSIG (c)" ns5/named.run >/dev/null || ret=1
 test_end
 
-# notify messages were sent to unresponsive 10.53.10.53 during the tests
+# notify messages were sent to unresponsive 10.53.0.6 during the tests
 # above, which should time out at some point; we need to wait for them to
 # appear in the logs in case the tests run faster than the notify timeouts
 
index 74c626b76b95f7cf8909fc937926399562c66eff..ebdbd0a28bbe0ca822c64d31a1d9f9aa306da4a3 100644 (file)
 
 import pytest
 
+# isctest.asyncserver requires dnspython >= 2.0.0
+pytest.importorskip("dns", minversion="2.0.0")
+
+
 pytestmark = pytest.mark.extra_artifacts(
     [
         "awk.out.*",
@@ -28,6 +32,7 @@ pytestmark = pytest.mark.extra_artifacts(
         "ns5/x21.bk-c",
         "ns5/x21.bk-c.jnl",
         "ns5/x21.db.jnl",
+        "ans6/ans.run",
     ]
 )