]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
nsec3 oracle backend regression tests
authorKees Monshouwer <mind04@monshouwer.org>
Thu, 9 Jan 2014 21:48:27 +0000 (22:48 +0100)
committermind04 <mind04@monshouwer.org>
Thu, 9 Jan 2014 22:22:12 +0000 (23:22 +0100)
regression-tests/start-test-stop

index 74ac418939c2ba603a3e66f7760bcca2e7ee254d..e3ff8f60568b0349913200367043395272d485f0 100755 (executable)
@@ -313,6 +313,7 @@ remotebackend-pipe-dnssec remotebackend-unix-dnssec remotebackend-http-dnssec re
 #remotebackend-pipe-nsec3 remotebackend-unix-nsec3 remotebackend-http-nsec3
 #remotebackend-pipe-nsec3-narrow remotebackend-unix-nsec3-narrow remotebackend-http-nsec3-narrow
 goracle-nodnssec goracle goracle-nsec3 goracle-nsec3-optout
+oracle-nodnssec oracle oracle-nsec3
 
 * Add -presigned to any ext-nsd, ext-bind, bind, gmysql or gsqlite3 test (except narrow)
   to test presigned operation.
@@ -870,13 +871,14 @@ __EOF__
                        ;;
 
 
-               oracle-nodnssec | oracle | oracle-nsec3 | oracle-nsec3-optout)
+               oracle-nodnssec | oracle | oracle-nsec3)
                        [ -z "$ORACLEUSER" ] && ORACLEUSER=pdns
                        [ -z "$ORACLEPASSWD" ] && ORACLEPASSWD=pdns
 
                        echo "START ../modules/oraclebackend/dropschema;" | sqlplus -S $ORACLEUSER/$ORACLEPASSWD@xe > oracle.log
                        echo "START ../modules/oraclebackend/schema;" | sqlplus -S $ORACLEUSER/$ORACLEPASSWD@xe >> oracle.log
-                       tosql oracle | sqlplus -S $ORACLEUSER/$ORACLEPASSWD@xe >> oracle.log
+                       ../pdns/zone2sql --oracle | grep -v 'INSERT INTO Records' | sqlplus -S $ORACLEUSER/$ORACLEPASSWD@xe >> oracle.log
+                       ../pdns/zone2sql --oracle | grep " 'SOA', " | sqlplus -S $ORACLEUSER/$ORACLEPASSWD@xe >> oracle.log
 
                        cat > pdns-oracle.conf << __EOF__
 launch=oracle
@@ -899,37 +901,35 @@ __EOF__
                                ../pdns/pdnssec --config-dir=. --config-name=oracle activate-tsig-key tsig.com test master
                        fi
 
-                       for zone in $(grep zone named.conf  | cut -f2 -d\")
-                       do
-                               if [ $context != goracle-nodnssec ]
-                               then
+                       if [ $context != oracle-nodnssec ]
+                       then
+                               for zone in $(grep zone named.conf  | cut -f2 -d\")
+                               do
                                        securezone $zone oracle
-#                                      if [ $context = goracle-nsec3 ] || [ $context = goracle-nsec3-optout ]
-#                                      then
-#                                              ../pdns/pdnssec --config-dir=. --config-name=goracle set-nsec3 $zone "1 $optout 1 abcd" 2>&1
-#                                              ../pdns/pdnssec --config-dir=. --config-name=goracle rectify-zone $zone 2>&1
-#                                      fi
-#                              else
-#                                      ../pdns/pdnssec --config-dir=. --config-name=goracle rectify-zone $zone 2>&1
-                               fi
-                       done
+                                       if [ $context = oracle-nsec3 ]
+                                       then
+                                               ../pdns/pdnssec --config-dir=. --config-name=oracle set-nsec3 $zone "1 0 1 abcd" 2>&1
+                                       fi
+                               done
+                       fi
+
+                       echo "TRUNCATE TABLE records;" | sqlplus -S $ORACLEUSER/$ORACLEPASSWD@xe >> oracle.log
+                       ../pdns/zone2sql --oracle | grep -v 'INSERT INTO Zones' | sqlplus -S $ORACLEUSER/$ORACLEPASSWD@xe >> oracle.log
 
                        $RUNWRAPPER $PDNS --daemon=no --local-port=$port --config-dir=. \
                                --config-name=oracle --socket-dir=./ --no-shuffle \
                                --send-root-referral --query-logging \
                                --cache-ttl=$cachettl $lua_prequery &
 
-                       skipreasons="nodyndns"
                        if [ $context = oracle-nsec3 ]
                        then
+                               skipreasons="nodyndns oracle-nsec3"
                                extracontexts="dnssec nsec3"
-                       elif [ $context = oracle-nsec3-optout ]
-                       then
-                               extracontexts="dnssec nsec3 nsec3-optout"
                        elif [ $context = oracle-nodnssec ]
                        then
-                               skipreasons="nodnssec nodyndns"
+                               skipreasons="nodyndns nodnssec"
                        else
+                               skipreasons="nodyndns oracle-nsec"
                                extracontexts="dnssec"
                        fi
                        skipreasons="$skipreasons noent" # TODO add ent support to oracle backend