From adf2aa360847736db4f87b39ee8691b210eeb8a6 Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Wed, 15 May 2024 22:03:42 -0700 Subject: [PATCH 1/3] dnskey: fix test case --- lib/test/rrs/dnskey.json | 12 ++++++------ lib/zone_record.js | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/test/rrs/dnskey.json b/lib/test/rrs/dnskey.json index 67689ef..c4c8511 100644 --- a/lib/test/rrs/dnskey.json +++ b/lib/test/rrs/dnskey.json @@ -1,11 +1,11 @@ { "id": 4096, "zid": 4096, - "owner": "mail.example.com.", + "owner": "example.com.", "ttl": 86400, - "type": "CERT", - "cert type": "PGP", - "key tag": 0, - "algorithm": 0, - "certificate": "hexidecimalkeystring1" + "type": "DNSKEY", + "flags": 256, + "protocol": 3, + "algorithm": 5, + "publickey": "( AQPSKmynfzW4kyBv015MUG2DeIQ3 Cbl+BBZH4b/0PY1kxkmvHjcZc8no kfzj31GajIQKY+5CptLr3buXA10h WqTkF7H6RfoRqXQeogmMHfpftf6z Mv1LyBUgia7za6ZEzOJBOztyvhjL 742iU/TpPSEDhm2SNKLijfUppn1U aNvv4w== )" } diff --git a/lib/zone_record.js b/lib/zone_record.js index 4d67e79..204d576 100644 --- a/lib/zone_record.js +++ b/lib/zone_record.js @@ -236,7 +236,7 @@ function getMap(rrType) { return { address: 'target' } case 'DNSKEY': return { - address: 'public key', + address: 'publickey', weight: 'flags', priority: 'protocol', other: 'algorithm', From 6ee0a792f9f1f74074abe1f75800d2ac13fd3461 Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Wed, 15 May 2024 22:03:47 -0700 Subject: [PATCH 2/3] test.sh: constrain test runner so that it doesn't try running ./test.js --- test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.sh b/test.sh index 1feccad..c2a424d 100755 --- a/test.sh +++ b/test.sh @@ -20,7 +20,7 @@ else # npm i --no-save node-test-github-reporter # $NODE --test --test-reporter=node-test-github-reporter # else - $NODE --test --test-reporter=spec + $NODE --test --test-reporter=spec lib/*.test.js routes/*.test.js # fi fi From 50944f06e810471d1594dd68b362cd82f8aae9cb Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Wed, 15 May 2024 22:06:44 -0700 Subject: [PATCH 3/3] rename test.js -> test-fixtures.js --- test.js => test-fixtures.js | 0 test.sh | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) rename test.js => test-fixtures.js (100%) diff --git a/test.js b/test-fixtures.js similarity index 100% rename from test.js rename to test-fixtures.js diff --git a/test.sh b/test.sh index c2a424d..3bad8fe 100755 --- a/test.sh +++ b/test.sh @@ -3,12 +3,12 @@ set -eu NODE="node --no-warnings=ExperimentalWarning" -$NODE test.js teardown -$NODE test.js setup +$NODE test-fixtures.js teardown +$NODE test-fixtures.js setup cleanup() { echo "cleaning DB objects" - $NODE test.js teardown + $NODE test-fixtures.js teardown } trap cleanup EXIT 1 2 3 6