]> granicus.if.org Git - pdns/commitdiff
Add test for rec_control manpage
authorPieter Lexis <pieter.lexis@powerdns.com>
Tue, 9 Feb 2016 09:51:26 +0000 (10:51 +0100)
committerPieter Lexis <pieter.lexis@powerdns.com>
Wed, 23 Mar 2016 21:40:16 +0000 (22:40 +0100)
Closes #601

regression-tests.recursor/config.sh
regression-tests.recursor/rec_control-manpage/command [new file with mode: 0755]
regression-tests.recursor/rec_control-manpage/description [new file with mode: 0644]
regression-tests.recursor/rec_control-manpage/expected_result [new file with mode: 0644]
regression-tests/runtests
regression-tests/start-test-stop

index a3ffc930a5d0cc4e1f1545c9609575ce4dfe1a25..c257da2a9bc95607afbffa608a50be70e78ca29e 100755 (executable)
@@ -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 (executable)
index 0000000..de6ec87
--- /dev/null
@@ -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 (file)
index 0000000..4ffa0c2
--- /dev/null
@@ -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 (file)
index 0000000..e69de29
index c8f745fc8364220f801e3847d3ee0bac03c4c564..e030e1f1c6b8402ce14b674c3f6442e6bc57d7d2 100755 (executable)
@@ -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}
index 437fb644f9ae152c0cc6fe2d54ed38cfc8099f96..6e9f8c3598b0e4f1152f47a02872de215652f442 100755 (executable)
@@ -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}