]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
auth: update lmdb tests and some cleanup 7789/head
authorKees Monshouwer <mind04@monshouwer.org>
Tue, 7 May 2019 16:48:04 +0000 (18:48 +0200)
committermind04 <mind04@monshouwer.org>
Tue, 7 May 2019 22:58:27 +0000 (00:58 +0200)
regression-tests/backends/lmdb-master
regression-tests/tests/00dnssec-grabkeys/command
regression-tests/tests/00dnssec-grabkeys/expected_result
regression-tests/tests/00dnssec-grabkeys/expected_result.dnssec [deleted file]
regression-tests/tests/00dnssec-grabkeys/expected_result.lmdb [deleted file]

index dbcbfe4a4ee235eeea4fbe8ac92a53fcc86af3d7..9f37e57725c598b6362f5d03ddaa7d0d35d652fc 100644 (file)
@@ -6,7 +6,6 @@ launch=lmdb
 lmdb-filename=./pdns.lmdb
 __EOF__
 
-        skipreasons="$skipreasons lmdb nodyndns"
         rm -f pdns.lmdb*
         for zone in $(grep 'zone ' named.conf  | cut -f2 -d\" | grep -v '^nztest.com$')
         do
@@ -17,28 +16,21 @@ __EOF__
             fi
             if [ $context != lmdb-nodnssec ]
             then
-                extracontexts="dnssec lmdb"
-                skipreasons="$skipreasons nodyndns"
-                if [ $context = lmdb-nsec3 ]
+                if [ $zone != insecure.dnssec-parent.com ]
                 then
-                    extracontexts="dnssec nsec3 lmdb"
-                    $PDNSUTIL --config-dir=. --config-name=lmdb set-nsec3 $zone "1 0 1 abcd" 2>&1
-                elif [ $context =  lmdb-nsec3-optout ]
-                then
-                    extracontexts="dnssec nsec3 nsec3-optout lmdb"
-                    skipreasons="$skipreasons optout"
-                    $PDNSUTIL --config-dir=. --config-name=lmdb set-nsec3 $zone "1 1 1 abcd" 2>&1
-                elif [ $context = lmdb-nsec3-narrow ]
-                then
-                    $PDNSUTIL --config-dir=. --config-name=lmdb set-nsec3 $zone '1 1 1 abcd' narrow 2>&1
-                    extracontexts="dnssec narrow lmdb"
-                    skipreasons="$skipreasons narrow"
-                else
-                    skipreasons="$skipreasons nsec"
+                    if [ $context = lmdb-nsec3 ]
+                    then
+                        $PDNSUTIL --config-dir=. --config-name=lmdb set-nsec3 $zone "1 0 1 abcd" 2>&1
+                    elif [ $context =  lmdb-nsec3-optout ]
+                    then
+                        $PDNSUTIL --config-dir=. --config-name=lmdb set-nsec3 $zone "1 1 1 abcd" 2>&1
+                    elif [ $context = lmdb-nsec3-narrow ]
+                    then
+                        $PDNSUTIL --config-dir=. --config-name=lmdb set-nsec3 $zone '1 1 1 abcd' narrow 2>&1
+                    fi
+                    securezone $zone lmdb
                 fi
-                securezone $zone lmdb
             else
-                skipreasons="$skipreasons nodnssec nodyndns"
                 $PDNSUTIL --config-dir=. --config-name=lmdb rectify-zone $zone 2>&1
             fi
             if [ "$zone" = "tsig.com" ]; then
@@ -54,7 +46,31 @@ __EOF__
             --disable-axfr-rectify=yes --outgoing-axfr-expand-alias=yes \
             --cache-ttl=$cachettl --dname-processing $lua_prequery &
 
+        extracontexts="lmdb"
+        skipreasons="lmdb nodyndns"
+
+        if [ $context = lmdb-nsec3 ]
+        then
+            extracontexts="$extracontexts dnssec nsec3"
+            skipreasons="$skipreasons nsec3"
+        elif [ $context = lmdb-nsec3-optout ]
+        then
+            extracontexts="$extracontexts dnssec nsec3 nsec3-optout"
+            skipreasons="$skipreasons optout"
+        elif [ $context = lmdb-nsec3-narrow ]
+        then
+            extracontexts="$extracontexts dnssec narrow"
+            skipreasons="$skipreasons narrow"
+        elif [ $context = lmdb-nodnssec ]
+        then
+            skipreasons="$skipreasons nodnssec"
+        else
+            extracontexts="$extracontexts dnssec"
+            skipreasons="$skipreasons nsec"
+        fi
+
         ;;
+
     *)
         nocontext=yes
 esac
index 234627a67233efd27e705eec382ef377ab61f731..a6ac2abb2a0806e36b0b23d9bce577eda144ef59 100755 (executable)
@@ -22,9 +22,9 @@ echo "server:" >> unbound-host.conf
 echo "  do-not-query-address: 192.168.0.0/16" >> unbound-host.conf
 echo '  trust-anchor-file: "trustedkeys"' >> unbound-host.conf
 
-if [ -e trustedkeys ]
-then
-  cat trustedkeys | grep -c '.' # because wc -l is not portable enough!
-fi
+#if [ -e trustedkeys ]
+#then
+#  cat trustedkeys | grep -c '.' # because wc -l is not portable enough!
+#fi
 
 ldns-key2ds -n trustedkeys | awk -F '\t' '{print "addTA(\""$1"\", \""$5"\")"}' > recursor.trustedkeys.lua
\ No newline at end of file
diff --git a/regression-tests/tests/00dnssec-grabkeys/expected_result.dnssec b/regression-tests/tests/00dnssec-grabkeys/expected_result.dnssec
deleted file mode 100644 (file)
index 48082f7..0000000
+++ /dev/null
@@ -1 +0,0 @@
-12
diff --git a/regression-tests/tests/00dnssec-grabkeys/expected_result.lmdb b/regression-tests/tests/00dnssec-grabkeys/expected_result.lmdb
deleted file mode 100644 (file)
index b4de394..0000000
+++ /dev/null
@@ -1 +0,0 @@
-11