]>
git.ipfire.org Git - thirdparty/pdns.git/blob - regression-tests.recursor-dnssec/test_ReadTrustAnchorsFromFile.py
1 from __future__
import print_function
4 from recursortests
import RecursorTest
7 class testReadTrustAnchorsFromFile(RecursorTest
):
8 _confdir
= 'ReadTAsFromFile'
10 _config_template
= """dnssec=validate"""
11 _lua_config_file
= """clearTA()
12 readTrustAnchorsFromFile('root.keys')"""
14 def testCorrectFile(self
):
15 """Ensure the file is read correctly"""
16 rec_controlCmd
= [os
.environ
['RECCONTROL'],
17 '--config-dir=%s' % 'configs/' + self
._confdir
,
19 expected
= b
"""Configured Trust Anchors:
21 \t\t36914 13 2 c94ed457ff79afe03804c26ce4fa832687db92bc231aff98617791fc71a65870
22 \t\t42924 13 2 b49e0aafd6e147742afb9eab0e76af0546357dc6c61bf67d7c745cf6f43f460e
25 ret
= subprocess
.check_output(rec_controlCmd
, stderr
=subprocess
.STDOUT
)
26 self
.assertEqual(ret
, expected
)
28 except subprocess
.CalledProcessError
as e
: