tests.sh revision 0c27b3fe77ac1d5094ba3521e8142d9e7973133f
# 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
echo "I: checking that named-checkconf handles a known good config"
ret=0
echo "I: checking that named-checkconf prints a known good config"
ret=0
echo "I: checking that named-checkconf -x removes secrets"
ret=0
# ensure there is a secret and that it is not the check string.
do
ret=0
echo "I: checking that named-checkconf detects error in $bad"
done
do
ret=0
echo "I: checking that named-checkconf detects no error in $good"
done
echo "I: checking that named-checkconf -z catches missing hint file"
ret=0
grep "could not configure root hints from 'nonexistent.db': file not found" hint-nofile.out > /dev/null || ret=1
echo "I: checking that named-checkconf catches range errors"
ret=0
echo "I: checking that named-checkconf warns of notify inconsistencies"
ret=0
echo "I: checking named-checkconf dnssec warnings"
ret=0
# this one should have no warnings
echo "I: range checking fields that do not allow zero"
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
echo "I: checking options allowed in inline-signing slaves"
ret=0
echo "I: check file + inline-signing for slave zones"
echo "I: checking named-checkconf DLZ warnings"
ret=0
echo "I: checking for missing key directory warning"
ret=0
rm -f test.keydir
echo "I: checking that named-checkconf -z catches conflicting ttl with max-ttl"
ret=0
echo "I: checking that named-checkconf -z catches invalid max-ttl"
ret=0
echo "I: checking that named-checkconf -z skips zone check with alternate databases"
ret=0
echo "I: checking that named-checkconf -z skips zone check with DLZ"
ret=0
echo "I: checking that named-checkconf -z fails on view with ANY class"
ret=0
echo "I: checking that named-checkconf -z fails on view with CLASS255 class"
ret=0
echo "I: checking that named-checkconf -z passes on view with IN class"
ret=0
echo "I: checking that named-checkconf -z passes on view with CLASS1 class"
ret=0
echo "I: check that check-names fails as configured"
ret=0
echo "I: check that check-mx fails as configured"
ret=0
echo "I: check that check-dup-records fails as configured"
ret=0
echo "I: check that check-mx fails as configured"
ret=0
echo "I: check that check-mx-cname fails as configured"
ret=0
echo "I: check that check-srv-cname fails as configured"
ret=0
echo "I: check that named-checkconf -p properly print a port range"
ret=0
echo "I: check that named-checkconf -z handles in-view"
ret=0
echo "I: check that named-checkconf prints max-cache-size <percentage> correctly"
ret=0
echo "I:exit status: $status"