From: Pieter Lexis Date: Tue, 9 Feb 2016 09:51:26 +0000 (+0100) Subject: Add test for rec_control manpage X-Git-Tag: dnsdist-1.0.0-beta1~64^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F3620%2Fhead;p=thirdparty%2Fpdns.git Add test for rec_control manpage Closes #601 --- diff --git a/regression-tests.recursor/config.sh b/regression-tests.recursor/config.sh index a3ffc930a5..c257da2a9b 100755 --- a/regression-tests.recursor/config.sh +++ b/regression-tests.recursor/config.sh @@ -6,6 +6,7 @@ fi export PDNS=${PDNS:-../../../pdns/pdns_server} export PDNSRECURSOR=${PDNSRECURSOR:-../../../pdns/recursordist/pdns_recursor} +export RECCONTROL=${RECCONTROL:-../../../pdns/recursordist/rec_control} . ./vars @@ -483,7 +484,8 @@ api-key=secret api-readonly=yes forward-zones-file=$(pwd)/recursor-service/forward-zones-file -socket-dir=$(pwd)/recursor-serviceS +socket-dir=$(pwd)/recursor-service auth-zones=global.box.answer-cname-in-local.example.net=$(pwd)/recursor-service/global.box.answer-cname-in-local.example.net.zone,auth-zone.example.net=$(pwd)/recursor-service/auth-zone.example.net.zone,another-auth-zone.example.net=$(pwd)/recursor-service/another-auth-zone.example.net.zone +loglevel=9 EOF diff --git a/regression-tests.recursor/rec_control-manpage/command b/regression-tests.recursor/rec_control-manpage/command new file mode 100755 index 0000000000..de6ec8772b --- /dev/null +++ b/regression-tests.recursor/rec_control-manpage/command @@ -0,0 +1,14 @@ +#!/bin/sh +elements="$($RECCONTROL --config-dir=./config/recursor-service help | grep -v -e '^ ' | awk '{print $1}')" + +missing_elements="" +for element in $elements; do + grep -e -q "^$element" ../docs/manpages/rec_control.1.md || missing_elements="$element\n$missing_elements" +done + +if [ $missing_elements != "" ]; then + echo "The following commands are missing from the manpage:\n" + echo $missing_elements +fi + +exit 0 diff --git a/regression-tests.recursor/rec_control-manpage/description b/regression-tests.recursor/rec_control-manpage/description new file mode 100644 index 0000000000..4ffa0c24d1 --- /dev/null +++ b/regression-tests.recursor/rec_control-manpage/description @@ -0,0 +1 @@ +Checks if all commands for rec_control exist in the manpage. diff --git a/regression-tests.recursor/rec_control-manpage/expected_result b/regression-tests.recursor/rec_control-manpage/expected_result new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/runtests b/regression-tests/runtests index c8f745fc83..e030e1f1c6 100755 --- a/regression-tests/runtests +++ b/regression-tests/runtests @@ -5,6 +5,7 @@ MAKE=${MAKE:-make} export PDNS=${PDNS:-${PWD}/../pdns/pdns_server} export PDNS2=${PDNS2:-${PWD}/../pdns/pdns_server} export PDNSRECURSOR=${PDNSRECURSOR:-${PWD}/../pdns_recursor} +export RECCONTROL=${RECCONTROL:-${PWD}/../rec_control} export SDIG=${SDIG:-${PWD}/../pdns/sdig} export NOTIFY=${NOTIFY:-${PWD}/../pdns/notify} export NSEC3DIG=${NSEC3DIG:-${PWD}/../pdns/nsec3dig} diff --git a/regression-tests/start-test-stop b/regression-tests/start-test-stop index 437fb644f9..6e9f8c3598 100755 --- a/regression-tests/start-test-stop +++ b/regression-tests/start-test-stop @@ -7,6 +7,7 @@ fi export PDNS=${PDNS:-${PWD}/../pdns/pdns_server} export PDNS2=${PDNS2:-${PWD}/../pdns/pdns_server} export PDNSRECURSOR=${PDNSRECURSOR:-${PWD}/../pdns_recursor} +export RECCONTROL=${RECCONTROL:-${PWD}/../rec_control} export SDIG=${SDIG:-${PWD}/../pdns/sdig} export NOTIFY=${NOTIFY:-${PWD}/../pdns/notify} export NSEC3DIG=${NSEC3DIG:-${PWD}/../pdns/nsec3dig}