]> git.ipfire.org Git - thirdparty/pdns.git/blob - regression-tests.recursor-dnssec/test_Expired.py
Merge pull request #8141 from rgacogne/dnsdist-ocsp
[thirdparty/pdns.git] / regression-tests.recursor-dnssec / test_Expired.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 testExpired(RecursorTest):
11 """This regression test starts the authoritative servers with a clock that is
12 set 15 days into the past. Hence, the recursor must reject the signatures
13 because they are expired.
14 """
15 _confdir = 'Expired'
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)