tests.sh revision 0c27b3fe77ac1d5094ba3521e8142d9e7973133f
#
# Copyright (C) 2015, 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
DIGOPTS="@10.53.0.1 -p 5300"
n=`expr $n + 1`
echo "${1} (${n})"
ret=0
}
host="$1"
type="$2"
ip="$3"
cat <<EOF > ns1/update.txt
server 10.53.0.1 5300
ttl 86400
update add $host $type $ip
send
EOF
$NSUPDATE ns1/update.txt > /dev/null 2>&1 || {
return 1
}
echo $out > added.a.out.$n
return 1
}
echo $out > added.ptr.out.$n
return 1
}
return 0
}
host="$1"
type="$2"
cat <<EOF > ns1/update.txt
server 10.53.0.1 5300
update del $host $type
send
EOF
$NSUPDATE ns1/update.txt > /dev/null 2>&1 || {
return 1
}
echo $out > deleted.a.out.$n
return 1
}
echo $out > deleted.ptr.out.$n
return 1
}
return 0
}
echo "I:checking dyndb still works after reload"
echo "I:exit status: $status"