# Copyright (C) 2011, 2012, 2014-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/.
# $Id: tests.sh,v 1.3 2011/08/09 04:12:25 tbox Exp $
status=0
n=0
n=`expr $n + 1`
echo "I:Checking that reconfiguring empty zones is silent ($n)"
ret=0
sleep 1
n=`expr $n + 1`
echo "I:Checking that reloading empty zones is silent ($n)"
ret=0
sleep 1
VERSION=`../../../../isc-config.sh --version | cut -d = -f 2`
n=`expr $n + 1`
ret=0
echo "I:Checking that default version works for rndc ($n)"
n=`expr $n + 1`
ret=0
echo "I:Checking that custom version works for rndc ($n)"
grep "^version: BIND $VERSION ${DESCRIPTION}${DESCRIPTION:+ }<id:........*> (this is a test of version)" rndc.status.ns3.$n > /dev/null || ret=1
n=`expr $n + 1`
ret=0
echo "I:Checking that default version works for query ($n)"
n=`expr $n + 1`
ret=0
echo "I:Checking that custom version works for query ($n)"
n=`expr $n + 1`
ret=0
echo "I:Checking that default hostname works for query ($n)"
n=`expr $n + 1`
ret=0
echo "I:Checking that custom hostname works for query ($n)"
n=`expr $n + 1`
ret=0
echo "I:Checking that default server-id is none for query ($n)"
n=`expr $n + 1`
ret=0
echo "I:Checking that server-id hostname works for query ($n)"
n=`expr $n + 1`
ret=0
echo "I:Checking that server-id hostname works for EDNS name server ID request ($n)"
n=`expr $n + 1`
ret=0
echo "I:Checking that custom server-id works for query ($n)"
n=`expr $n + 1`
ret=0
echo "I:Checking that custom server-id works for EDNS name server ID request ($n)"
echo "I:exit status: $status"