From 5e7b96061de80b4cb52f52a65fed274a1e666e73 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Wed, 14 Feb 2024 12:39:57 +0100 Subject: [PATCH] Test ZTC with root zone 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. --- regression-tests.recursor-dnssec/test_ZTC.py | 31 ++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 regression-tests.recursor-dnssec/test_ZTC.py diff --git a/regression-tests.recursor-dnssec/test_ZTC.py b/regression-tests.recursor-dnssec/test_ZTC.py new file mode 100644 index 0000000000..a801a25c8f --- /dev/null +++ b/regression-tests.recursor-dnssec/test_ZTC.py @@ -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'') + -- 2.47.2