]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
auth: use the api in the lmdb regression tests 7643/head
authorKees Monshouwer <mind04@monshouwer.org>
Sun, 31 Mar 2019 11:37:36 +0000 (13:37 +0200)
committermind04 <mind04@monshouwer.org>
Sun, 31 Mar 2019 11:37:36 +0000 (13:37 +0200)
regression-tests/backends/lmdb-slave

index 7ef99f31d482be2204a53ce3ac2c1110eb0b1044..992a8bcf4a83deecef0d2c3c79ad202b430ef9da 100644 (file)
@@ -26,15 +26,14 @@ __EOF__
 
        $RUNWRAPPER $PDNS2 --daemon=no --local-port=$port --config-dir=. \
                --config-name=lmdb2 --socket-dir=./ --no-shuffle \
-               --slave --retrieval-threads=4 \
-               --slave-cycle-interval=300 --dname-processing &
+               --slave --dname-processing --api --api-key=secret &
 
        echo 'waiting for zones to be slaved'
        loopcount=0
        while [ $loopcount -lt 30 ]
        do
                sleep 5
-               present=$($PDNSUTIL --config-dir=. --config-name=lmdb2 list-all-zones slave | wc -l)
+               present=$(curl -s -S -H 'X-API-Key: secret' http://127.0.0.1:8081/api/v1/servers/localhost/zones  | jq -r '.[] | .serial' | grep -c -v '^0$')
                if [ $zones -eq $present ]
                then
                        break