tests.sh revision 273757406ab93aed277847e8d87befc51420fcf3
#
# Copyright (C) 2010 Internet Systems Consortium, Inc. ("ISC")
#
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: tests.sh,v 1.3 2010/12/17 00:57:38 marka Exp $
status=0
n=0
do
n=`expr $n + 1`
echo "I:checking that $conf is accepted ($n)"
ret=0
done
do
n=`expr $n + 1`
echo "I:checking that $conf is rejected ($n)"
ret=0
done
n=`expr $n + 1`
echo "I:trying an axfr that should be denied (NOTAUTH) ($n)"
ret=0
n=`expr $n + 1`
echo "I:non recursive query for a static-stub zone with server name should be rejected ($n)"
ret=0
|| ret=1
n=`expr $n + 1`
echo "I:non recursive query for a static-stub zone with server name should be rejected ($n)"
ret=0
|| ret=1
n=`expr $n + 1`
echo "I:allow-query ACL ($n)"
ret=0
n=`expr $n + 1`
echo "I:look for static-stub zone data with recursion (should be found) ($n)"
ret=0
n=`expr $n + 1`
echo "I:checking authoritative NS is ignored for delegation ($n)"
ret=0
# the auth server returns a different (and incorrect) NS for .example.
# but static-stub configuration should still be used
n=`expr $n + 1`
echo "I:checking queries for a child zone of the static-stub zone ($n)"
ret=0
# prime the delegation to a child zone of the static-stub zone
# temporarily disable the the parent zone
# query the child zone again. this should directly go to the child and
# succeed.
# re-enable the parent
sed 's/EXAMPLE_ZONE_PLACEHOLDER/zone "example" { type master; file "example.db.signed"; };/' ns3/named.conf.in > ns3/named.conf
n=`expr $n + 1`
echo "I:checking authoritative NS addresses are ignored for delegation ($n)"
ret=0
# reload the server. this will flush the ADB.
# ask another RR that would require delegation. static-stub configuration
# the authoritative server of the query domain (example.com) is the apex
# name of the static-stub zone (example). in this case the static-stub
# configuration must be ignored and cached information must be used.
n=`expr $n + 1`
echo "I:checking NS of static-stub is ignored when referenced from other domain ($n)"
ret=0
# check server-names
n=`expr $n + 1`
echo "I:checking static-stub with a server-name ($n)"
ret=0
# Note: for a short term workaround we use ::1, assuming it's configured and
# usable for our tests. We should eventually use the test ULA and available
# checks introduced in change 2916.
n=`expr $n + 1`
echo "I:checking IPv6 static-stub address ($n)"
ret=0
n=`expr $n + 1`
echo "I:look for static-stub zone data with DNSSEC validation ($n)"
ret=0
n=`expr $n + 1`
echo "I:look for a child of static-stub zone data with DNSSEC validation ($n)"
ret=0
# reload with a different name server: exisitng zone shouldn't be reused.
n=`expr $n + 1`
echo "I:checking server reload with a different static-stub config ($n)"
ret=0
sed 's/SERVER_CONFIG_PLACEHOLDER/server-addresses { 10.53.0.4; };/' ns2/named.conf.in > ns2/named.conf
echo "I:exit status: $status"
exit $status