tests.sh revision bf8267aa453e5d2a735ed732a043b77a0b355b20
# 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.11 2012/02/22 14:22:54 marka Exp $ # WARNING: The test labelled "testing request-ixfr option in view vs zone" # is fragile because it depends upon counting instances of records # in the log file - need a better approach <sdm> - until then, # if you add any tests above that point, you will break the test. DIGOPTS=
"+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd" echo "I:testing initial AXFR" nil. 300 SOA ns.nil. root.nil. 1 300 300 604800 300 nil. 300 SOA ns.nil. root.nil. 1 300 300 604800 300 nil. 300 TXT "initial AXFR" nil. 300 SOA ns.nil. root.nil. 1 300 300 604800 300 # Initially, ns1 is not authoritative for anything (see setup.sh). # Now that ans is up and running with the right data, we make it cat <<EOF
>>ns1/named.conf for i
in 0 1 2 3 4 5 6 7 8 9 echo "I:testing successful IXFR" # We change the IP address of a.nil., and the TXT record at the apex. # Then we do a SOA-only update. nil. 300 SOA ns.nil. root.nil. 3 300 300 604800 300 nil. 300 SOA ns.nil. root.nil. 3 300 300 604800 300 nil. 300 SOA ns.nil. root.nil. 1 300 300 604800 300 nil. 300 TXT "initial AXFR" nil. 300 SOA ns.nil. root.nil. 2 300 300 604800 300 nil. 300 TXT "successful IXFR" nil. 300 SOA ns.nil. root.nil. 2 300 300 604800 300 nil. 300 SOA ns.nil. root.nil. 3 300 300 604800 300 nil. 300 SOA ns.nil. root.nil. 3 300 300 604800 300 echo "I:testing AXFR fallback after IXFR failure" # Provide a broken IXFR response and a working fallback AXFR response nil. 300 SOA ns.nil. root.nil. 4 300 300 604800 300 nil. 300 SOA ns.nil. root.nil. 4 300 300 604800 300 nil. 300 SOA ns.nil. root.nil. 3 300 300 604800 300 nil. 300 TXT "delete-nonexistent-txt-record" nil. 300 SOA ns.nil. root.nil. 4 300 300 604800 300 nil. 300 TXT "this-txt-record-would-be-added" nil. 300 SOA ns.nil. root.nil. 4 300 300 604800 300 nil. 300 SOA ns.nil. root.nil. 3 300 300 604800 300 nil. 300 TXT "fallback AXFR" nil. 300 SOA ns.nil. root.nil. 3 300 300 604800 300 echo "I:testing ixfr-from-differences option" # ns3 is master; ns4 is slave #echo "I: digging against master: " #echo "I: digging against slave: " for i
in 0 1 2 3 4 5 6 7 8 9 # slave should have gotten notify and updated echo "I:failed to get incremental response" echo "I:testing request-ixfr option in view vs zone" # There's a view with 2 zones. In the view, "request-ixfr yes" # but in the zone "sub.test", request-ixfr no" # we want to make sure that a change to sub.test results in AXFR, while # changes to test. result in IXFR echo "I: this result should be AXFR" for i
in 0 1 2 3 4 5 6 7 8 9 echo "I: this result should be AXFR" echo "I:failed to get nonincremental response in 2nd AXFR test" echo "I: success: AXFR it was" echo "I: this result should be IXFR" for i
in 0 1 2 3 4 5 6 7 8 9 echo "I:failed to get incremental response in 2nd IXFR test" echo "I: success: IXFR it was"