From: Otto Moerbeek Date: Wed, 14 Feb 2024 11:39:57 +0000 (+0100) Subject: Test ZTC with root zone X-Git-Tag: auth-4.9.0-beta1~2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F13788%2Fhead;p=thirdparty%2Fpdns.git 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. --- 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'') +