Add masterfile-format checkconf tests
Add tests that check that masterfile-format map generate deprecation warning and mastefile-formats text and raw doesn't.
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright (C) 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/.
|
||||
*
|
||||
* See the COPYRIGHT file distributed with this work for additional
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
options {
|
||||
port 5300;
|
||||
};
|
||||
|
||||
zone example {
|
||||
type secondary;
|
||||
primaries { ::1; };
|
||||
masterfile-format map;
|
||||
};
|
||||
20
bin/tests/system/checkconf/good-masterfile-format-raw.conf
Normal file
20
bin/tests/system/checkconf/good-masterfile-format-raw.conf
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright (C) 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/.
|
||||
*
|
||||
* See the COPYRIGHT file distributed with this work for additional
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
options {
|
||||
port 5300;
|
||||
};
|
||||
|
||||
zone example {
|
||||
type secondary;
|
||||
primaries { ::1; };
|
||||
masterfile-format raw;
|
||||
};
|
||||
20
bin/tests/system/checkconf/good-masterfile-format-text.conf
Normal file
20
bin/tests/system/checkconf/good-masterfile-format-text.conf
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright (C) 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/.
|
||||
*
|
||||
* See the COPYRIGHT file distributed with this work for additional
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
options {
|
||||
port 5300;
|
||||
};
|
||||
|
||||
zone example {
|
||||
type secondary;
|
||||
primaries { ::1; };
|
||||
masterfile-format text;
|
||||
};
|
||||
@@ -571,6 +571,24 @@ grep "not recommended" < checkconf.out$n > /dev/null || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
n=$((n+1))
|
||||
echo_i "check that masterfile-format map generates deprecation warning ($n)"
|
||||
ret=0
|
||||
$CHECKCONF deprecated-masterfile-format-map.conf > checkconf.out$n 2>/dev/null || ret=1
|
||||
grep "is deprecated" < checkconf.out$n >/dev/null || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
|
||||
status=$((status+ret))
|
||||
|
||||
n=$((n+1))
|
||||
echo_i "check that masterfile-format text and raw don't generate deprecation warning ($n)"
|
||||
ret=0
|
||||
$CHECKCONF good-masterfile-format-text.conf > checkconf.out$n 2>/dev/null || ret=1
|
||||
grep "is deprecated" < checkconf.out$n >/dev/null && ret=1
|
||||
$CHECKCONF good-masterfile-format-raw.conf > checkconf.out$n 2>/dev/null || ret=1
|
||||
grep "is deprecated" < checkconf.out$n >/dev/null && ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
|
||||
status=$((status+ret))
|
||||
|
||||
rmdir keys
|
||||
|
||||
echo_i "exit status: $status"
|
||||
|
||||
Reference in New Issue
Block a user