tests.sh revision 0c27b3fe77ac1d5094ba3521e8142d9e7973133f
#
# Copyright (C) 2000, 2001, 2004, 2007, 2011-2016 Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
status=0
n=0
#
# Wait up to 10 seconds for the servers to finish starting before testing.
#
do
ret=0
[ $ret = 0 ] && break
sleep 1
done
n=`expr $n + 1`
echo "I:checking initial status ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking startup notify rate limit ($n)"
ret=0
# the notifies should span at least 4 seconds
# ... with no more than 5 in any one second
echo "I:reloading with example2 using HUP and waiting up to 45 seconds"
try=0
do
sleep 1
done
n=`expr $n + 1`
echo "I:checking notify message was logged ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking example2 loaded ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking example2 contents have been transferred after HUP reload ($n)"
ret=0
echo "I:stopping master and restarting with example4 then waiting up to 45 seconds"
try=0
do
sleep 1
done
n=`expr $n + 1`
echo "I:checking notify message was logged ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking example4 loaded ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking example4 contents have been transfered after restart ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking notify to alternate port with master inheritance"
$NSUPDATE << EOF
server 10.53.0.2 5300
zone x21
update add added.x21 0 in txt "test string"
send
EOF
do
sleep 1
done
n=`expr $n + 1`
echo "I:checking notify to multiple views using tsig"
ret=0
$NSUPDATE << EOF
server 10.53.0.5 5300
zone x21
key a aaaaaaaaaaaaaaaaaaaa
update add added.x21 0 in txt "test string"
send
EOF
do
break
sleep 1
done
echo "I:exit status: $status"