From 37e60e28af1524902ac8732159028c98401ea587 Mon Sep 17 00:00:00 2001 From: Tomas Krizek Date: Mon, 18 Mar 2019 13:17:13 +0100 Subject: [PATCH] ta_update: polish test --- modules/ta_update/root.key | 1 - modules/ta_update/root.keys | 1 + modules/ta_update/ta_update.test.lua | 8 ++++---- 3 files changed, 5 insertions(+), 5 deletions(-) delete mode 100644 modules/ta_update/root.key create mode 100644 modules/ta_update/root.keys diff --git a/modules/ta_update/root.key b/modules/ta_update/root.key deleted file mode 100644 index 3836b317f..000000000 --- a/modules/ta_update/root.key +++ /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 index 000000000..e292b5a7b --- /dev/null +++ b/modules/ta_update/root.keys @@ -0,0 +1 @@ +. IN DS 20326 8 2 E06D44B80B8F1D39A95C0B0D7C65D08458E880409BBC683457104237C7F8EC8D diff --git a/modules/ta_update/ta_update.test.lua b/modules/ta_update/ta_update.test.lua index 835e232d3..7e55075ed 100644 --- a/modules/ta_update/ta_update.test.lua +++ b/modules/ta_update/ta_update.test.lua @@ -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') -- 2.47.2