Skip to content

Commit

Permalink
Metadata update is now in the same transaction as the AXFR. Add sqlit…
Browse files Browse the repository at this point in the history
…e3-presigned tests to the regression test suite.
  • Loading branch information
mind04 committed Apr 28, 2013
1 parent 95cea9b commit b23b90a
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pdns/slavecommunicator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ void CommunicatorClass::suck(const string &domain,const string &remote)
UeberBackend *B=dynamic_cast<UeberBackend *>(P.getBackend()); // copy of the same UeberBackend
NSEC3PARAMRecordContent ns3pr, hadNs3pr;
bool narrow, hadNarrow=false;
DNSSECKeeper dk; // has its own ueberbackend
DNSSECKeeper dk (B); // reuse our backend for DNSSECKeeper
bool dnssecZone = false;
bool haveNSEC3=false;
if(dk.isSecuredZone(domain)) {
Expand Down
33 changes: 33 additions & 0 deletions regression-tests/start-test-stop
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,39 @@ then
break
fi
done
elif [ ${context:0:8} = gsqlite3 ]
then
rm -f pdns.sqlite31
sqlite3 pdns.sqlite31 < ../pdns/no-dnssec.schema.sqlite3.sql
sqlite3 pdns.sqlite31 < ../pdns/dnssec.schema.sqlite3.sql

for zone in $(grep zone named.conf | cut -f2 -d\" | tac)
do
sqlite3 pdns.sqlite31 "INSERT INTO domains (name, type, master) VALUES('$zone','SLAVE','127.0.0.1:$port');"
done

port=$((port+100))

$RUNWRAPPER ../pdns/pdns_server --daemon=no --local-port=$port --socket-dir=./ \
--no-shuffle --launch=gsqlite3 --gsqlite3-dnssec \
--fancy-records --send-root-referral \
--cache-ttl=0 --query-cache-ttl=0 --no-config --slave --retrieval-threads=1 \
--gsqlite3-database=pdns.sqlite31 --gsqlite3-pragma-synchronous=0 |& egrep -v "update records set ordername|insert into records" &
echo 'waiting for zones to be slaved'
set +e
while sleep 10
do
todo=$(sqlite3 pdns.sqlite31 'SELECT COUNT(id) FROM domains WHERE last_check IS NULL')
if [ $? -eq 0 ]
then
if [ $todo = 0 ]
then
break
fi
fi
done
set -e
sqlite3 pdns.sqlite31 ANALYZE;
elif [ ${context:0:4} = bind ]
then
context=${context}-presigned
Expand Down

0 comments on commit b23b90a

Please sign in to comment.