]>
Commit | Line | Data |
---|---|---|
5e7b9606 OM |
1 | import dns |
2 | import time | |
3 | import os | |
4 | import subprocess | |
5 | ||
6 | from recursortests import RecursorTest | |
7 | ||
8 | class testZTC(RecursorTest): | |
9 | ||
10 | _confdir = 'ZTC' | |
11 | _config_template = """ | |
12 | dnssec=validate | |
13 | """ | |
14 | _lua_config_file = """ | |
15 | zoneToCache(".", "axfr", "193.0.14.129") -- k-root | |
16 | """ | |
17 | ||
18 | def testZTC(self): | |
19 | grepCmd = ['grep', 'validationStatus="Secure"', 'configs/' + self._confdir + '/recursor.log'] | |
20 | ret = b'' | |
21 | for i in range(30): | |
22 | time.sleep(1) | |
23 | try: | |
24 | ret = subprocess.check_output(grepCmd, stderr=subprocess.STDOUT) | |
25 | except subprocess.CalledProcessError as e: | |
26 | continue | |
27 | print(b'A' + ret) | |
28 | break | |
29 | print(ret) | |
30 | self.assertNotEqual(ret, b'') | |
31 |