]> git.ipfire.org Git - thirdparty/pdns.git/blob - regression-tests.recursor-dnssec/test_NotYetValid.py
Merge pull request #14118 from jap/patch-2
[thirdparty/pdns.git] / regression-tests.recursor-dnssec / test_NotYetValid.py
1 import errno
2 import os
3 import subprocess
4 import time
5
6 import dns
7 from recursortests import RecursorTest
8
9
10 class testNotYetValid(RecursorTest):
11 """This regression test starts the authoritative servers with a clock that is
12 set 15 days into the future. Hence, the recursor must reject the signatures
13 because they are not yet valid.
14 """
15 _confdir = 'NotYetValid'
16
17 _config_template = """dnssec=validate"""
18
19 _auth_env = {'LD_PRELOAD':os.environ.get('LIBFAKETIME'),
20 'FAKETIME':'+15d'}
21
22 def testA(self):
23 query = dns.message.make_query('host1.secure.example', 'A')
24 res = self.sendUDPQuery(query)
25
26 self.assertRcodeEqual(res, dns.rcode.SERVFAIL)