]> granicus.if.org Git - pdns/commitdiff
Regression tests
authorAki Tuomi <cmouse@desteem.org>
Sat, 15 Jun 2013 18:22:39 +0000 (21:22 +0300)
committerAki Tuomi <cmouse@desteem.org>
Tue, 3 Sep 2013 15:21:06 +0000 (18:21 +0300)
modules/gsqlite3backend/gsqlite3backend.cc
regression-tests/start-test-stop
regression-tests/tsig-axfr/command [new file with mode: 0755]
regression-tests/tsig-axfr/description [new file with mode: 0644]
regression-tests/tsig-axfr/expected_result [new file with mode: 0644]
regression-tests/tsig-axfr/skip.narrow [new file with mode: 0644]
regression-tests/tsig-axfr/skip.nodnssec [new file with mode: 0644]
regression-tests/tsig-axfr/skip.presigned [new file with mode: 0644]

index 2d6d2df9feafd8bc8fdae93ba9fa763dc2b7e15c..8583ff25be407adb9a1c0bcf1987ac9f612af063 100644 (file)
@@ -131,7 +131,7 @@ public:
     declare(suffix,"deactivate-domain-key-query","", "update cryptokeys set active=0 where domain_id=(select id from domains where name='%s') and  cryptokeys.id=%d");
     declare(suffix,"remove-domain-key-query","", "delete from cryptokeys where domain_id=(select id from domains where name='%s') and cryptokeys.id=%d");
     declare(suffix,"get-tsig-key-query","", "select algorithm, secret from tsigkeys where name='%s'");
-    declare(suffix,"set-tsig-key-query","", "insert or replace into tsigkeys (name,algorithm,secret) values('%s','%s','%s')");
+    declare(suffix,"set-tsig-key-query","", "replace into tsigkeys (name,algorithm,secret) values('%s','%s','%s')");
     declare(suffix,"delete-tsig-key-query","", "delete from tsigkeys where name='%s'");
     declare(suffix,"get-tsig-keys-query","", "select name,algorithm, secret from tsigkeys");
 
index 759c8a134654658f8f12a7fbac784fb4437b82cc..dd96a2114f6ad923a03f55a4cb8a29313e3057c9 100755 (executable)
@@ -176,6 +176,8 @@ case $context in
                bind-dnssec | bind-dnssec-nsec3 | bind-dnssec-nsec3-optout | bind-dnssec-nsec3-narrow)
                        rm -f dnssec.sqlite3
                        ../pdns/pdnssec --config-dir=. create-bind-db dnssec.sqlite3
+                       ../pdns/pdnssec --config-dir=. import-tsig-key test hmac-md5 'kp4/24gyYsEzbuTVJRUMoqGFmN3LYgVDzJ/3oRSP7ys='
+
                        for zone in $(grep zone named.conf  | cut -f2 -d\")
                        do
                                securezone $zone
diff --git a/regression-tests/tsig-axfr/command b/regression-tests/tsig-axfr/command
new file mode 100755 (executable)
index 0000000..6cff30f
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh 
+
+../pdns/pdnssec --config-dir=. enable-tsig-key minimal.com test master
+dig -t axfr minimal.com @$nameserver -p $port -y 'test:kp4/24gyYsEzbuTVJRUMoqGFmN3LYgVDzJ/3oRSP7ys=' | grep 'IN\s*SOA'
+../pdns/pdnssec --config-dir=. disable-tsig-key minimal.com test master
diff --git a/regression-tests/tsig-axfr/description b/regression-tests/tsig-axfr/description
new file mode 100644 (file)
index 0000000..019b9ca
--- /dev/null
@@ -0,0 +1 @@
+Basic TSIG axfr test
diff --git a/regression-tests/tsig-axfr/expected_result b/regression-tests/tsig-axfr/expected_result
new file mode 100644 (file)
index 0000000..154dc89
--- /dev/null
@@ -0,0 +1,4 @@
+Enabled TSIG key test for minimal.com
+minimal.com.           120     IN      SOA     ns1.example.com. ahu.example.com. 2000081501 28800 7200 604800 86400
+minimal.com.           120     IN      SOA     ns1.example.com. ahu.example.com. 2000081501 28800 7200 604800 86400
+Disabled TSIG key test for minimal.com
diff --git a/regression-tests/tsig-axfr/skip.narrow b/regression-tests/tsig-axfr/skip.narrow
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/regression-tests/tsig-axfr/skip.nodnssec b/regression-tests/tsig-axfr/skip.nodnssec
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/regression-tests/tsig-axfr/skip.presigned b/regression-tests/tsig-axfr/skip.presigned
new file mode 100644 (file)
index 0000000..e69de29