#
# Copyright (C) 2000, 2001, 2004, 2007, 2012, 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/.
#
# Dynamic update test suite.
#
# Usage:
#
# perl update_test.pl [-s server] [-p port] zone
#
# The server defaults to 127.0.0.1.
# The port defaults to 53.
#
# The "Special NS rules" tests will only work correctly if the
# has no NS records to begin with, or alternatively has a
# single NS record pointing at the name "ns1" (relative to
# the zone name).
#
# Installation notes:
#
# This program uses the Net::DNS::Resolver module.
# You can install it by saying
#
# perl -MCPAN -e "install Net::DNS"
#
# $Id: update.pl,v 1.5 2007/06/19 23:47:05 tbox Exp $
#
$opt_s = "127.0.0.1";
$opt_p = 53;
getopt('s:p:');
@ARGV == 1 or die
"usage: perl update_test.pl [-s server] [-p port] zone\n";
my $failures = 0;
sub assert {
my ($cond, $explanation) = @_;
if (!$cond) {
print "I:Test Failed: $explanation ***\n";
$failures++
}
}
sub test {
}
# Did it work?
if (defined $reply) {
} else {
}
}
sub section {
my ($msg) = @_;
print "I:$msg\n";
}
for ($i = 0; $i < 1000; $i++) {
}
if ($failures) {
print "I:$failures tests failed.\n";
} else {
print "I:Update of $opt_s zone $zone successful.\n";
}
exit $failures;