]> git.ipfire.org Git - thirdparty/pdns.git/blame - regression-tests.recursor-dnssec/test_ReadTrustAnchorsFromFile.py
Merge pull request #13192 from aj-gh/gss-tsig-featuremsg
[thirdparty/pdns.git] / regression-tests.recursor-dnssec / test_ReadTrustAnchorsFromFile.py
CommitLineData
e4ae55e5 1from __future__ import print_function
8f29eeaa
PL
2import os
3import subprocess
4from recursortests import RecursorTest
5
6
ef2ea4bf 7class testReadTrustAnchorsFromFile(RecursorTest):
8f29eeaa
PL
8 _confdir = 'ReadTAsFromFile'
9
10 _config_template = """dnssec=validate"""
11 _lua_config_file = """clearTA()
12readTrustAnchorsFromFile('root.keys')"""
13
14 def testCorrectFile(self):
15 """Ensure the file is read correctly"""
16 rec_controlCmd = [os.environ['RECCONTROL'],
17 '--config-dir=%s' % 'configs/' + self._confdir,
18 'get-tas']
3d144e24 19 expected = b"""Configured Trust Anchors:
8f29eeaa
PL
20.
21\t\t36914 13 2 c94ed457ff79afe03804c26ce4fa832687db92bc231aff98617791fc71a65870
22\t\t42924 13 2 b49e0aafd6e147742afb9eab0e76af0546357dc6c61bf67d7c745cf6f43f460e
23"""
24 try:
25 ret = subprocess.check_output(rec_controlCmd, stderr=subprocess.STDOUT)
26 self.assertEqual(ret, expected)
27
28 except subprocess.CalledProcessError as e:
e4ae55e5 29 print(e.output)
8f29eeaa
PL
30 raise
31