3908. [bug] rndc now differentiates between a zone in multiple

views and a zone that doesn't exist at all. [RT #36691]

(cherry picked from commit c38341ec43)
This commit is contained in:
Mark Andrews
2014-08-02 14:43:26 +10:00
parent 50a77aefec
commit 13ffd78910
9 changed files with 131 additions and 4 deletions

View File

@@ -14,8 +14,6 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id$
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
@@ -160,5 +158,17 @@ then
else
echo "I:failed (status)"; status=1
fi
echo "I: checking 'rdnc zonestatus' with duplicated zone name"
ret=0
$RNDC -c ../common/rndc.conf -s 10.53.0.1 -p 9953 zonestatus duplicate.example > rndc.out.duplicate 2>&1
checkfor "zone 'duplicate.example' was found in multiple views" rndc.out.duplicate
$RNDC -c ../common/rndc.conf -s 10.53.0.1 -p 9953 zonestatus duplicate.example in primary > rndc.out.duplicate 2>&1
checkfor "name: duplicate.example" rndc.out.duplicate
$RNDC -c ../common/rndc.conf -s 10.53.0.1 -p 9953 zonestatus nosuchzone.example > rndc.out.duplicate 2>&1
checkfor "no matching zone 'nosuchzone.example' in any view" rndc.out.duplicate
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
echo "I:exit status: $status"
exit $status