tests.sh revision 43e2c588ba773f471a7a2459b10a67a800c576c6
# Copyright (C) 2005, 2007, 2010-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/.
status=0
n=0
n=`expr $n + 1`
echo "I: checking that named-checkconf handles a known good config ($n)"
ret=0
n=`expr $n + 1`
echo "I: checking that named-checkconf prints a known good config ($n)"
ret=0
n=`expr $n + 1`
echo "I: checking that named-checkconf -x removes secrets ($n)"
ret=0
# ensure there is a secret and that it is not the check string.
do
n=`expr $n + 1`
echo "I: checking that named-checkconf detects error in $bad ($n)"
ret=0
done
do
n=`expr $n + 1`
echo "I: checking that named-checkconf detects no error in $good ($n)"
ret=0
done
n=`expr $n + 1`
echo "I: checking that named-checkconf -z catches missing hint file ($n)"
ret=0
grep "could not configure root hints from 'nonexistent.db': file not found" hint-nofile.out > /dev/null || ret=1
n=`expr $n + 1`
echo "I: checking that named-checkconf catches range errors ($n)"
ret=0
n=`expr $n + 1`
echo "I: checking that named-checkconf warns of notify inconsistencies ($n)"
ret=0
n=`expr $n + 1`
echo "I: checking named-checkconf dnssec warnings ($n)"
ret=0
# this one should have no warnings
n=`expr $n + 1`
echo "I: range checking fields that do not allow zero ($n)"
ret=0
cat > badzero.conf << EOF
options {
$field 0;
};
EOF
cat > badzero.conf << EOF
view dummy {
$field 0;
};
EOF
cat > badzero.conf << EOF
options {
$field 0;
};
view dummy {
};
EOF
cat > badzero.conf << EOF
zone dummy {
type slave;
masters { 0.0.0.0; };
$field 0;
};
EOF
done
n=`expr $n + 1`
echo "I: checking options allowed in inline-signing slaves ($n)"
ret=0
n=`expr $n + 1`
echo "I: check file + inline-signing for slave zones ($n)"
n=`expr $n + 1`
echo "I: checking named-checkconf DLZ warnings ($n)"
ret=0
n=`expr $n + 1`
echo "I: checking for missing key directory warning ($n)"
ret=0
rm -f test.keydir
n=`expr $n + 1`
echo "I: checking that named-checkconf -z catches conflicting ttl with max-ttl ($n)"
ret=0
n=`expr $n + 1`
echo "I: checking that named-checkconf -z catches invalid max-ttl ($n)"
ret=0
n=`expr $n + 1`
echo "I: checking that named-checkconf -z skips zone check with alternate databases ($n)"
ret=0
n=`expr $n + 1`
echo "I: checking that named-checkconf -z skips zone check with DLZ ($n)"
ret=0
n=`expr $n + 1`
echo "I: checking that named-checkconf -z fails on view with ANY class ($n)"
ret=0
n=`expr $n + 1`
echo "I: checking that named-checkconf -z fails on view with CLASS255 class ($n)"
ret=0
n=`expr $n + 1`
echo "I: checking that named-checkconf -z passes on view with IN class ($n)"
ret=0
n=`expr $n + 1`
echo "I: checking that named-checkconf -z passes on view with CLASS1 class ($n)"
ret=0
n=`expr $n + 1`
echo "I: check that check-names fails as configured ($n)"
ret=0
n=`expr $n + 1`
echo "I: check that check-mx fails as configured ($n)"
ret=0
n=`expr $n + 1`
echo "I: check that check-dup-records fails as configured ($n)"
ret=0
n=`expr $n + 1`
echo "I: check that check-mx fails as configured ($n)"
ret=0
n=`expr $n + 1`
echo "I: check that check-mx-cname fails as configured ($n)"
ret=0
n=`expr $n + 1`
echo "I: check that check-srv-cname fails as configured ($n)"
ret=0
n=`expr $n + 1`
echo "I: check that named-checkconf -p properly print a port range ($n)"
ret=0
n=`expr $n + 1`
echo "I: check that named-checkconf -z handles in-view ($n)"
ret=0
echo "I: check that named-checkconf prints max-cache-size <percentage> correctly"
ret=0
n=`expr $n + 1`
echo "I: check that 'dnssec-lookaside auto;' generates a warning ($n)"
ret=0
n=`expr $n + 1`
echo "I: check that 'dnssec-lookaside . trust-anchor dlv.isc.org;' generates a warning ($n)"
ret=0
n=`expr $n + 1`
echo "I: check that 'dnssec-lookaside . trust-anchor dlv.example.com;' doesn't generates a warning ($n)"
ret=0
echo "I:exit status: $status"