Added test to verify that both include glob-expression and include

non-glob-expression works.
This commit is contained in:
Diego Fronza
2019-10-22 10:43:24 -03:00
parent a50ab3df86
commit f97ba7a7c2
8 changed files with 35 additions and 27 deletions

View File

@@ -22,7 +22,7 @@ n=0
# Test 1 - check if zone1 was loaded.
n=`expr $n + 1`
echo_i "test $n: glob include zone1"
echo_i "checking glob include of zone1 config ($n)"
ret=0
$DIG $DIGOPTS @10.53.0.2 -b 10.53.0.2 zone1.com. a > dig.out.ns2.$n || ret=1
grep 'status: NOERROR' dig.out.ns2.$n > /dev/null || ret=1
@@ -32,7 +32,7 @@ status=`expr $status + $ret`
# Test 2 - check if zone2 was loaded.
n=`expr $n + 1`
echo_i "test $n: glob include zone2"
echo_i "checking glob include of zone2 config ($n)"
ret=0
$DIG $DIGOPTS @10.53.0.2 -b 10.53.0.2 zone2.com. a > dig.out.ns2.$n || ret=1
grep 'status: NOERROR' dig.out.ns2.$n > /dev/null || ret=1
@@ -40,5 +40,15 @@ grep '^zone2.com.' dig.out.ns2.$n > /dev/null || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
# Test 3 - check if standard file path (no magic chars) works.
n=`expr $n + 1`
echo_i "checking include of standard file path config ($n)"
ret=0
$DIG $DIGOPTS @10.53.0.2 -b 10.53.0.2 mars.com. a > dig.out.ns2.$n || ret=1
grep 'status: NOERROR' dig.out.ns2.$n > /dev/null || ret=1
grep '^mars.com.' dig.out.ns2.$n > /dev/null || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
echo_i "exit status: $status"
[ $status -eq 0 ] || exit 1