]> granicus.if.org Git - pdns/commitdiff
add gpgsql* tests
authorPeter van Dijk <peter.van.dijk@netherlabs.nl>
Wed, 14 Mar 2012 16:14:10 +0000 (16:14 +0000)
committerPeter van Dijk <peter.van.dijk@netherlabs.nl>
Wed, 14 Mar 2012 16:14:10 +0000 (16:14 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@2494 d19b8d6e-7fed-0310-83ef-9ca221ded41b

regression-tests/start-test-stop
regression-tests/too-big-for-udp-query-no-truncate-additional/expected_result.gpgsql-nodnssec [new file with mode: 0644]
regression-tests/too-big-for-udp-query-no-truncate-additional/expected_result.gpgsql-nsec3 [new file with mode: 0644]

index 10d28c8050798e443ed13b1d009a8b808e70dbba..1e8d27c829fbe87db2e2b876506576b24a9a9251 100755 (executable)
@@ -24,6 +24,7 @@ context is one of:
 bind bind-dnssec bind-dnssec-nsec3
 gmysql-nodnssec gmysql gmysql-nsec3
 gsqlite3-nodnssec gsqlite3 gsqlite3-nsec3
+gpgsql-nodnssec gpgsql gpgsql-nsec3
 
 add 'wait' (literally) after the context to not kill 
 pdns_server immediately after testing
@@ -134,6 +135,72 @@ __EOF__
                        fi
 
                        ;;      
+               gpgsql | gpgsql-nsec3)
+                       [ -z "$GPGSQLDB" ] && GPGSQLDB=pdnstest
+                       [ -z "$GPGSQLUSER" ] && GPGSQLUSER=$(whoami)
+
+                       dropdb --user="$GPGSQLUSER" "$GPGSQLDB" || echo ignoring mysqladmin drop failure
+                       createdb --user="$GPGSQLUSER" "$GPGSQLDB"       || echo ignoring mysqladmin drop failure
+                       psql --user="$GPGSQLUSER" "$GPGSQLDB" < ../pdns/no-dnssec.schema.pgsql.sql
+                       psql --user="$GPGSQLUSER" "$GPGSQLDB" < ../pdns/dnssec.schema.pgsql.sql
+
+                       tosql gpgsql | psql --user="$GPGSQLUSER" "$GPGSQLDB" 2>&1 | uniq -c
+
+                       cat > pdns-gpgsql.conf << __EOF__
+launch=gpgsql
+gpgsql-dbname=$GPGSQLDB
+gpgsql-user=$GPGSQLUSER
+gpgsql-dnssec
+__EOF__
+                       for zone in $(grep zone named.conf  | cut -f2 -d\")
+                       do
+                               ../pdns/pdnssec --config-dir=. --config-name=gpgsql secure-zone $zone 2>&1
+                               if [ $context = gpgsql-nsec3 ]
+                               then
+                                       ../pdns/pdnssec --config-dir=. --config-name=gpgsql set-nsec3 $zone '1 1 1 abcd' 2>&1
+                                       ../pdns/pdnssec --config-dir=. --config-name=gpgsql rectify-zone $zone 2>&1
+                               fi
+                       done
+
+                       ../pdns/pdns_server --daemon=no --local-port=$port --socket-dir=./  \
+                               --no-shuffle --launch=gpgsql --gpgsql-dnssec \
+                               --fancy-records --query-logging --send-root-referral --loglevel=9 \
+                               --cache-ttl=0 --no-config \
+                               --gpgsql-dbname="$GPGSQLDB" \
+                               --gpgsql-user="$GPGSQLUSER" &
+                       if [ $context = gpgsql-nsec3 ]
+                       then
+                               extracontexts="dnssec nsec3"
+                       else
+                               extracontexts="dnssec"
+                       fi
+
+                       ;;      
+               gpgsql-nodnssec)
+                       [ -z "$GPGSQLDB" ] && GPGSQLDB=pdnstest
+                       [ -z "$GPGSQLUSER" ] && GPGSQLUSER=$(whoami)
+
+                       dropdb --user="$GPGSQLUSER" "$GPGSQLDB" || echo ignoring mysqladmin drop failure
+                       createdb --user="$GPGSQLUSER" "$GPGSQLDB"       || echo ignoring mysqladmin drop failure
+                       psql --user="$GPGSQLUSER" "$GPGSQLDB" < ../pdns/no-dnssec.schema.pgsql.sql
+
+                       tosql gpgsql | psql --user="$GPGSQLUSER" "$GPGSQLDB" 2>&1 | uniq -c
+
+                       cat > pdns-gpgsql.conf << __EOF__
+launch=gpgsql
+gpgsql-dbname=$GPGSQLDB
+gpgsql-user=$GPGSQLUSER
+__EOF__
+                       ../pdns/pdns_server --daemon=no --local-port=$port --socket-dir=./  \
+                               --no-shuffle --launch=gpgsql \
+                               --fancy-records --query-logging --send-root-referral --loglevel=9 \
+                               --cache-ttl=0 --no-config \
+                               --gpgsql-dbname="$GPGSQLDB" \
+                               --gpgsql-user="$GPGSQLUSER" &
+                       skipreasons=nodnssec
+                       ;;      
+
+
                gsqlite3-nodnssec)
                        rm -f pdns.sqlite3
                        sqlite3 pdns.sqlite3 < ../pdns/no-dnssec.schema.sqlite3.sql
diff --git a/regression-tests/too-big-for-udp-query-no-truncate-additional/expected_result.gpgsql-nodnssec b/regression-tests/too-big-for-udp-query-no-truncate-additional/expected_result.gpgsql-nodnssec
new file mode 100644 (file)
index 0000000..8a0085a
--- /dev/null
@@ -0,0 +1,28 @@
+0      together-too-much.example.com.  IN      MX      120     25 toomuchinfo-a.example.com.
+0      together-too-much.example.com.  IN      MX      120     25 toomuchinfo-b.example.com.
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.26
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.27
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.28
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.29
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.30
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.31
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.32
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.33
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.34
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.35
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.36
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.37
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.38
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.39
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.40
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.41
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.42
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.43
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.44
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.45
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.46
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.47
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.48
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.49
+Rcode: 0, RD: 0, QR: 1, TC: 0, AA: 1, opcode: 0
+Reply to question for qname='together-too-much.example.com.', qtype=MX
diff --git a/regression-tests/too-big-for-udp-query-no-truncate-additional/expected_result.gpgsql-nsec3 b/regression-tests/too-big-for-udp-query-no-truncate-additional/expected_result.gpgsql-nsec3
new file mode 100644 (file)
index 0000000..8a0085a
--- /dev/null
@@ -0,0 +1,28 @@
+0      together-too-much.example.com.  IN      MX      120     25 toomuchinfo-a.example.com.
+0      together-too-much.example.com.  IN      MX      120     25 toomuchinfo-b.example.com.
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.26
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.27
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.28
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.29
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.30
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.31
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.32
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.33
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.34
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.35
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.36
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.37
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.38
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.39
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.40
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.41
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.42
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.43
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.44
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.45
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.46
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.47
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.48
+2      toomuchinfo-b.example.com.      IN      A       120     192.168.99.49
+Rcode: 0, RD: 0, QR: 1, TC: 0, AA: 1, opcode: 0
+Reply to question for qname='together-too-much.example.com.', qtype=MX