3 # Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
4 # Copyright (C) 2001 Internet Software Consortium.
6 # Permission to use, copy, modify, and/or distribute this software for any
7 # purpose with or without fee is hereby granted, provided that the above
8 # copyright notice and this permission notice appear in all copies.
10 # THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
11 # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12 # AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
13 # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14 # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
15 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16 # PERFORMANCE OF THIS SOFTWARE.
18 # Id: tests.sh,v 1.5 2007/06/19 23:47:03 tbox Exp
21 .
$SYSTEMTESTTOP/conf.sh
25 DIGOPTS
="+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd"
26 DIGCMD
="$DIG $DIGOPTS @10.53.0.1 -p 5300"
27 SENDCMD
="$PERL ../send.pl 10.53.0.2 5301"
28 RNDCCMD
="$RNDC -s 10.53.0.1 -p 9953 -c ../common/rndc.conf"
30 echo "I:testing initial AXFR"
34 nil. 300 SOA ns.nil. root.nil. 1 300 300 604800 300
36 nil. 300 SOA ns.nil. root.nil. 1 300 300 604800 300
38 nil. 300 TXT "initial AXFR"
41 nil. 300 SOA ns.nil. root.nil. 1 300 300 604800 300
46 # Initially, ns1 is not authoritative for anything (see setup.sh).
47 # Now that ans is up and running with the right data, we make it
50 cat <<EOF >>ns1/named.conf
54 masters { 10.53.0.2; };
62 $DIGCMD nil. TXT |
grep 'initial AXFR' >/dev
/null ||
{
67 echo "I:testing successful IXFR"
69 # We change the IP address of a.nil., and the TXT record at the apex.
70 # Then we do a SOA-only update.
74 nil. 300 SOA ns.nil. root.nil. 3 300 300 604800 300
76 nil. 300 SOA ns.nil. root.nil. 3 300 300 604800 300
77 nil. 300 SOA ns.nil. root.nil. 1 300 300 604800 300
79 nil. 300 TXT "initial AXFR"
80 nil. 300 SOA ns.nil. root.nil. 2 300 300 604800 300
81 nil. 300 TXT "successful IXFR"
83 nil. 300 SOA ns.nil. root.nil. 2 300 300 604800 300
84 nil. 300 SOA ns.nil. root.nil. 3 300 300 604800 300
85 nil. 300 SOA ns.nil. root.nil. 3 300 300 604800 300
94 $DIGCMD nil. TXT |
grep 'successful IXFR' >/dev
/null ||
{
99 echo "I:testing AXFR fallback after IXFR failure"
101 # Provide a broken IXFR response and a working fallback AXFR response
105 nil. 300 SOA ns.nil. root.nil. 4 300 300 604800 300
107 nil. 300 SOA ns.nil. root.nil. 4 300 300 604800 300
108 nil. 300 SOA ns.nil. root.nil. 3 300 300 604800 300
109 nil. 300 TXT "delete-nonexistent-txt-record"
110 nil. 300 SOA ns.nil. root.nil. 4 300 300 604800 300
111 nil. 300 TXT "this-txt-record-would-be-added"
112 nil. 300 SOA ns.nil. root.nil. 4 300 300 604800 300
114 nil. 300 SOA ns.nil. root.nil. 3 300 300 604800 300
116 nil. 300 TXT "fallback AXFR"
117 nil. 300 SOA ns.nil. root.nil. 3 300 300 604800 300
126 $DIGCMD nil. TXT |
grep 'fallback AXFR' >/dev
/null ||
{
131 echo "I:exit status: $status"