]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
ta_update: polish test
authorTomas Krizek <tomas.krizek@nic.cz>
Mon, 18 Mar 2019 12:17:13 +0000 (13:17 +0100)
committerPetr Špaček <petr.spacek@nic.cz>
Thu, 4 Apr 2019 12:18:57 +0000 (14:18 +0200)
modules/ta_update/root.key [deleted file]
modules/ta_update/root.keys [new file with mode: 0644]
modules/ta_update/ta_update.test.lua

diff --git a/modules/ta_update/root.key b/modules/ta_update/root.key
deleted file mode 100644 (file)
index 3836b31..0000000
+++ /dev/null
@@ -1 +0,0 @@
-.                      163395  IN      DNSKEY  257 3 8 AwEAAaz/tAm8yTn4Mfeh5eyI96WSVexTBAvkMgJzkKTOiW1vkIbzxeF3 +/4RgWOq7HrxRixHlFlExOLAJr5emLvN7SWXgnLh4+B5xQlNVz8Og8kv ArMtNROxVQuCaSnIDdD5LKyWbRd2n9WGe2R8PzgCmr3EgVLrjyBxWezF 0jLHwVN8efS3rCj/EWgvIWgb9tarpVUDK/b58Da+sqqls3eNbuv7pr+e oZG+SrDK6nWeL3c6H5Apxz7LjVc1uTIdsIXxuOLYA4/ilBmSVIzuDWfd RUfhHdY6+cn8HFRm+2hM8AnXGXws9555KrUB5qihylGa8subX2Nn6UwN R1AkUTV74bU=
diff --git a/modules/ta_update/root.keys b/modules/ta_update/root.keys
new file mode 100644 (file)
index 0000000..e292b5a
--- /dev/null
@@ -0,0 +1 @@
+. IN DS 20326 8 2 E06D44B80B8F1D39A95C0B0D7C65D08458E880409BBC683457104237C7F8EC8D
index 835e232d3f598abead4dfcf2ece31347772d04d9..7e55075ed5351d29089e19029158a4c31448c313 100644 (file)
@@ -23,7 +23,7 @@ local function test_ta_update_vs_trust_anchors_dependency()
        ok(ta_update, 'ta_update module is loaded by default')
 
        assert(counter == 0, 'test init must work')
-       same(trust_anchors.config('root.key'), nil, 'load managed TA for root zone')
+       same(trust_anchors.add_file('root.keys'), nil, 'load managed TA for root zone')
        same(trust_anchors.keysets['\0'].managed, true, 'managed TA has managed flag')
        same(type(ta_update.tracked['\0'].event), 'number', 'adding managed TA starts tracking')
        same(counter, 0, 'TA refresh is only scheduled')
@@ -45,10 +45,10 @@ local function test_ta_update_vs_trust_anchors_dependency()
 end
 
 local function test_unloaded()
-       boom(trust_anchors.config, {'root.key', false}, 'managed TA cannot be added without ta_update module')
+       boom(trust_anchors.add_file, {'root.keys', false}, 'managed TA cannot be added without ta_update module')
 
        counter = 0
-       same(trust_anchors.config('root.key', true), nil, 'unmanaged TA can be added without ta_update module')
+       same(trust_anchors.add_file('root.keys', true), nil, 'unmanaged TA can be added without ta_update module')
        worker.sleep(0.3)
        ok(counter == 0, 'TA is actually unmanaged')
 
@@ -59,7 +59,7 @@ end
 
 local function test_reload()
        ok(modules.load('ta_update'), 'module can be re-loaded')
-       same(trust_anchors.config('root.key', false), nil, 'managed TA can be added after loading ta_update module')
+       same(trust_anchors.add_file('root.keys', false), nil, 'managed TA can be added after loading ta_update module')
        same(counter, 0, 'TA refresh is only scheduled')
        worker.sleep(0.3)
        ok(counter > 0, 'TA refresh asked for TA DNSKEY after some time')