rndc reconfig reports configuration errors the same way rndc reload does [RT #39635]
This commit is contained in:
@@ -275,5 +275,20 @@ grep "query: foo9876.bind CH TXT" ns3/named.run > /dev/null && ret=1
|
||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo "I:test 'rndc reconfig' with a broken config"
|
||||
ret=0
|
||||
$RNDC -s 10.53.0.3 -p 9953 -c ../common/rndc.conf reconfig > /dev/null || ret=1
|
||||
sleep 1
|
||||
mv ns3/named.conf ns3/named.conf.save
|
||||
echo "error error error" >> ns3/named.conf
|
||||
$RNDC -s 10.53.0.3 -p 9953 -c ../common/rndc.conf reconfig > rndc.output 2>&1 && ret=1
|
||||
grep "rndc: 'reconfig' failed: unexpected token" rndc.output > /dev/null || ret=1
|
||||
mv ns3/named.conf.save ns3/named.conf
|
||||
sleep 1
|
||||
$RNDC -s 10.53.0.3 -p 9953 -c ../common/rndc.conf reconfig > /dev/null || ret=1
|
||||
sleep 1
|
||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo "I:exit status: $status"
|
||||
exit $status
|
||||
|
||||
Reference in New Issue
Block a user