]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Test ZTC with root zone 13799/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 14 Feb 2024 11:39:57 +0000 (12:39 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 26 Feb 2024 14:25:47 +0000 (15:25 +0100)
1. If code changes make the validation fail we want to know.
2. If root zone changes break something we want to know as well, this might even be more important than 1.

So I think we just have to accept the occasional network issues on GH.

(cherry picked from commit 5e7b96061de80b4cb52f52a65fed274a1e666e73)

regression-tests.recursor-dnssec/test_ZTC.py [new file with mode: 0644]

diff --git a/regression-tests.recursor-dnssec/test_ZTC.py b/regression-tests.recursor-dnssec/test_ZTC.py
new file mode 100644 (file)
index 0000000..a801a25
--- /dev/null
@@ -0,0 +1,31 @@
+import dns
+import time
+import os
+import subprocess
+
+from recursortests import RecursorTest
+
+class testZTC(RecursorTest):
+
+    _confdir = 'ZTC'
+    _config_template = """
+dnssec=validate
+"""
+    _lua_config_file = """
+zoneToCache(".", "axfr", "193.0.14.129") -- k-root
+"""
+
+    def testZTC(self):
+        grepCmd = ['grep', 'validationStatus="Secure"', 'configs/' + self._confdir + '/recursor.log']
+        ret = b''
+        for i in range(30):
+            time.sleep(1)
+            try:
+                ret = subprocess.check_output(grepCmd, stderr=subprocess.STDOUT)
+            except subprocess.CalledProcessError as e:
+                continue
+            print(b'A' + ret)
+            break
+        print(ret)
+        self.assertNotEqual(ret, b'')
+