|
@@ -0,0 +1,94 @@
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+SYSTEMTESTTOP=..
|
|
|
|
+. $SYSTEMTESTTOP/conf.sh
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+status=0
|
|
|
|
+n=0
|
|
|
|
+
|
|
|
|
+echo "I:Checking b10-auth is working by default ($n)"
|
|
|
|
+$DIG +norec @10.53.0.1 -p 53210 ns.example.com. A >dig.out.$n || status=1
|
|
|
|
+
|
|
|
|
+grep 192.0.2.1 dig.out.$n > /dev/null || status=1
|
|
|
|
+if [ $status != 0 ]; then echo "I:failed"; fi
|
|
|
|
+n=`expr $n + 1`
|
|
|
|
+
|
|
|
|
+echo "I:Checking BIND 10 statistics after a pose ($n)"
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+sleep 2
|
|
|
|
+echo 'Stats show\n' | $RUN_BINDCTL \
|
|
|
|
+ --csv-file-dir=$BINDCTL_CSV_DIR > bindctl.out.$n || status=1
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+grep "\"auth.queries.tcp\": 1," bindctl.out.$n > /dev/null || status=1
|
|
|
|
+grep "\"auth.queries.udp\": 1," bindctl.out.$n > /dev/null || status=1
|
|
|
|
+if [ $status != 0 ]; then echo "I:failed"; fi
|
|
|
|
+n=`expr $n + 1`
|
|
|
|
+
|
|
|
|
+echo "I:Stopping b10-auth and checking that ($n)"
|
|
|
|
+echo 'config set Boss/start_auth false\nconfig commit\nquit\n' | $RUN_BINDCTL \
|
|
|
|
+ --csv-file-dir=$BINDCTL_CSV_DIR 2>&1 > /dev/null || status=1
|
|
|
|
+
|
|
|
|
+$DIG +tcp +norec @10.53.0.1 -p 53210 ns.example.com. A && status=1
|
|
|
|
+if [ $status != 0 ]; then echo "I:failed"; fi
|
|
|
|
+n=`expr $n + 1`
|
|
|
|
+
|
|
|
|
+echo "I:Restarting b10-auth and checking that ($n)"
|
|
|
|
+echo 'config set Boss/start_auth true\nconfig commit\nquit\n' | $RUN_BINDCTL \
|
|
|
|
+ --csv-file-dir=$BINDCTL_CSV_DIR 2>&1 > /dev/null || status=1
|
|
|
|
+$DIG +norec @10.53.0.1 -p 53210 ns.example.com. A >dig.out.$n || status=1
|
|
|
|
+grep 192.0.2.1 dig.out.$n > /dev/null || status=1
|
|
|
|
+if [ $status != 0 ]; then echo "I:failed"; fi
|
|
|
|
+n=`expr $n + 1`
|
|
|
|
+
|
|
|
|
+echo "I:Rechecking BIND 10 statistics after a pose ($n)"
|
|
|
|
+sleep 2
|
|
|
|
+echo 'Stats show\n' | $RUN_BINDCTL \
|
|
|
|
+ --csv-file-dir=$BINDCTL_CSV_DIR > bindctl.out.$n || status=1
|
|
|
|
+
|
|
|
|
+grep "\"auth.queries.tcp\": 0," bindctl.out.$n > /dev/null || status=1
|
|
|
|
+grep "\"auth.queries.udp\": 1," bindctl.out.$n > /dev/null || status=1
|
|
|
|
+if [ $status != 0 ]; then echo "I:failed"; fi
|
|
|
|
+n=`expr $n + 1`
|
|
|
|
+
|
|
|
|
+echo "I:Changing the data source from sqlite3 to in-memory ($n)"
|
|
|
|
+DATASRC_SPEC='[{"type": "memory", "zones": [{"origin": "com","file":'
|
|
|
|
+DATASRC_SPEC="${DATASRC_SPEC} \"${TEST_TOP}/bindctl/nsx1/example-normalized.db\"}]}]"
|
|
|
|
+echo "config set Auth/datasources ${DATASRC_SPEC}\nconfig commit\nquit\n" | $RUN_BINDCTL \
|
|
|
|
+ --csv-file-dir=$BINDCTL_CSV_DIR > bindctl.out.$n || status=1
|
|
|
|
+$DIG +norec @10.53.0.1 -p 53210 ns.example.com. A >dig.out.$n || status=1
|
|
|
|
+grep 192.0.2.2 dig.out.$n > /dev/null || status=1
|
|
|
|
+if [ $status != 0 ]; then echo "I:failed"; fi
|
|
|
|
+n=`expr $n + 1`
|
|
|
|
+
|
|
|
|
+echo "I:Rechecking BIND 10 statistics after changing the datasource ($n)"
|
|
|
|
+sleep 2
|
|
|
|
+echo 'Stats show\n' | $RUN_BINDCTL \
|
|
|
|
+ --csv-file-dir=$BINDCTL_CSV_DIR > bindctl.out.$n || status=1
|
|
|
|
+
|
|
|
|
+grep "\"auth.queries.tcp\": 0," bindctl.out.$n > /dev/null || status=1
|
|
|
|
+grep "\"auth.queries.udp\": 2," bindctl.out.$n > /dev/null || status=1
|
|
|
|
+if [ $status != 0 ]; then echo "I:failed"; fi
|
|
|
|
+n=`expr $n + 1`
|
|
|
|
+
|
|
|
|
+echo "I:exit status: $status"
|
|
|
|
+exit $status
|