+++ /dev/null
-#!/bin/bash
-cd pdns/pdns ; make sdig; cd ../..
-cd pdns/regression-tests
-
-standardConfig()
-{
- cat <<EOF
-daemon=no
-local-port=5299
-socket-dir=./
-no-shuffle
-fancy-records
-send-root-referral
-cache-ttl=0
-EOF
-}
-
-initSQLite3()
-{
- rm powerdns.sqlite3
- sqlite3 powerdns.sqlite3 < ../pdns/no-dnssec.schema.sqlite3.sql
- ../pdns/backends/bind/zone2sql --gsqlite --named-conf=./named.conf --transactions | sqlite3 powerdns.sqlite3
- echo analyze\; | sqlite3 powerdns.sqlite3
-
- standardConfig > pdns.conf
- (echo launch=gsqlite3
- echo gsqlite3-database=./powerdns.sqlite3 ) >> pdns.conf
-}
-
-upgradeSQLite3()
-{
- sqlite3 powerdns.sqlite3 < ../pdns/dnssec.schema.sqlite3.sql
- echo analyze\; | sqlite3 powerdns.sqlite3
- echo gsqlite3-dnssec >> pdns.conf
-}
-
-setDSSQLite3()
-{
- echo "insert into records (domain_id, name, type, content, ttl, auth) select domains.id, 'delegated.dnssec-parent.com', 'DS', '$1', 3600, '1' from domains where domains.name='dnssec-parent.com';" | sqlite3 powerdns.sqlite3
-}
-
-
-initPostgreSQL()
-{
- dropdb pdnsregress
- createdb pdnsregress
- psql pdnsregress < ../pdns/no-dnssec.schema.pgsql.sql
- ../pdns/backends/bind/zone2sql --gpgsql --named-conf=./named.conf --transactions | psql -q pdnsregress
- echo analyze | psql pdnsregress
- standardConfig > pdns.conf
- (echo launch=gpgsql
- echo gpgsql-dbname=pdnsregress
- echo gpgsql-user=ahu
- echo gpgsql-host=/var/run/postgresql/ ) >> pdns.conf
-}
-
-upgradePostgreSQL()
-{
- psql pdnsregress < ../pdns/dnssec.schema.pgsql.sql
- echo analyze | psql pdnsregress
- echo gpgsql-dnssec >> pdns.conf
-}
-
-setDSPostgreSQL()
-{
- echo "insert into records (domain_id, name, type, content, ttl, auth) select domains.id, 'delegated.dnssec-parent.com', 'DS', '$1', 3600, 't' from domains where domains.name='dnssec-parent.com';" | psql pdnsregress
-}
-
-
-function doTests()
-{
- DBTYPE=$1
-
- init$DBTYPE
- ../pdns/pdns_server --config-dir=./ --daemon=no &
-
- sleep 2
- export nameserver=127.0.0.1 port=5299
- ./runtests > ../../without-dnssec-$DBTYPE
-
- kill %1
-
- upgrade$DBTYPE
- PDNSSEC="../pdns/pdnssec --config-dir=./"
-
- $PDNSSEC rectify-zone example.com
- $PDNSSEC rectify-zone test.com
- $PDNSSEC rectify-zone wtest.com
-
- wait
- ../pdns/pdns_server --config-dir=./ --daemon=no &
- sleep 2
-
-
- ($PDNSSEC check-zone test.com
- $PDNSSEC check-zone wtest.com
- $PDNSSEC check-zone example.com) > ../../with-dnssec-$DBTYPE
-
- ./runtests >> ../../with-dnssec-$DBTYPE
-
- $PDNSSEC secure-zone dnssec-parent.com
- $PDNSSEC show-zone dnssec-parent.com
-
- $PDNSSEC secure-zone delegated.dnssec-parent.com
- $PDNSSEC show-zone delegated.dnssec-parent.com
-
- kill %1
-
- # now add the DS
- $PDNSSEC show-zone delegated.dnssec-parent.com | grep "^DS = " | cut -f6- -d" " |
- while read a
- do
- setDS$DBTYPE $a
- done
-
- KEYID=$($PDNSSEC show-zone dnssec-parent.com | grep '(ZSK)' |
- grep 'Active: 1$' | awk '{print $3}')
-
- $PDNSSEC export-zone-dnskey dnssec-parent.com $KEYID > trusted
- sleep 1
- wait
- ../pdns/pdns_server --config-dir=./ --daemon=no &
-
- sleep 2
- drill -t soa -D dnssec-parent.com @127.0.0.1 -p 5299 -k trusted >> ../../with-dnssec-$DBTYPE
- kill %1
- wait
-}
-
-doTests SQLite3
-doTests PostgreSQL
-
\ No newline at end of file