]> granicus.if.org Git - pdns/commitdiff
allow specific testing contexts to override expected_results; add some overrides
authorPeter van Dijk <peter.van.dijk@netherlabs.nl>
Thu, 19 Jan 2012 14:11:03 +0000 (14:11 +0000)
committerPeter van Dijk <peter.van.dijk@netherlabs.nl>
Thu, 19 Jan 2012 14:11:03 +0000 (14:11 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@2355 d19b8d6e-7fed-0310-83ef-9ca221ded41b

regression-tests/any-query/expected_result.bind-gsqlite3 [new file with mode: 0644]
regression-tests/any-query/expected_result.gmysql [new file with mode: 0644]
regression-tests/runtests
regression-tests/start-test-stop
regression-tests/too-big-for-udp-query-no-truncate-additional/expected_result.bind [new file with mode: 0644]
regression-tests/too-big-for-udp-query-no-truncate-additional/expected_result.bind-gsqlite3 [new file with mode: 0644]

diff --git a/regression-tests/any-query/expected_result.bind-gsqlite3 b/regression-tests/any-query/expected_result.bind-gsqlite3
new file mode 100644 (file)
index 0000000..a508813
--- /dev/null
@@ -0,0 +1,8 @@
+0      example.com.    IN      DNSKEY  120     256 3 5 AwEAAarTiHhPgvD28WCN8UBXcEcf8f+OF+d/bEoN6zTuHl/oVra5/qfonhYK/RjI74RzHc2wli9TpXOWycQV3YSfpFZ9z+GB/bbsvBon1XMyNf5KXuOwRdHZXIZh1cku3AcIyNroD26MPkbFLHY0+xRI+7u7OsQ6nYcPBpqDiJnB2BMh
+0      example.com.    IN      MX      120     10 smtp-servers.example.com.
+0      example.com.    IN      MX      120     15 smtp-servers.test.com.
+0      example.com.    IN      NS      120     ns1.example.com.
+0      example.com.    IN      NS      120     ns2.example.com.
+0      example.com.    IN      SOA     120     ns1.example.com. ahu.example.com. 2000081501 28800 7200 604800 86400
+Rcode: 0, RD: 0, QR: 1, TC: 1, AA: 1, opcode: 0
+Reply to question for qname='example.com.', qtype=ANY
diff --git a/regression-tests/any-query/expected_result.gmysql b/regression-tests/any-query/expected_result.gmysql
new file mode 100644 (file)
index 0000000..a508813
--- /dev/null
@@ -0,0 +1,8 @@
+0      example.com.    IN      DNSKEY  120     256 3 5 AwEAAarTiHhPgvD28WCN8UBXcEcf8f+OF+d/bEoN6zTuHl/oVra5/qfonhYK/RjI74RzHc2wli9TpXOWycQV3YSfpFZ9z+GB/bbsvBon1XMyNf5KXuOwRdHZXIZh1cku3AcIyNroD26MPkbFLHY0+xRI+7u7OsQ6nYcPBpqDiJnB2BMh
+0      example.com.    IN      MX      120     10 smtp-servers.example.com.
+0      example.com.    IN      MX      120     15 smtp-servers.test.com.
+0      example.com.    IN      NS      120     ns1.example.com.
+0      example.com.    IN      NS      120     ns2.example.com.
+0      example.com.    IN      SOA     120     ns1.example.com. ahu.example.com. 2000081501 28800 7200 604800 86400
+Rcode: 0, RD: 0, QR: 1, TC: 1, AA: 1, opcode: 0
+Reply to question for qname='example.com.', qtype=ANY
index c94b1a40b7702f4a6af7bf1bc6c744e17960c798..a4c1c7a9c090c5ef4f597e0bcc6e79c472ada13f 100755 (executable)
@@ -27,7 +27,9 @@ do
        else    
                $a/command > /dev/null
                $a/command > $a/real_result
-               diff -u $a/expected_result $a/real_result > $a/diff
+               expected=$a/expected_result
+               [ -n "$context" ] && [ -e "$a/expected_result.$context" ] && expected=$a/expected_result.$context
+               diff -u $expected $a/real_result > $a/diff
                if [ -s $a/diff ] 
                then
                        result="        Failed test $a"
index 1e71ffe89ec31a06d257e33472d0cb03c3101fee..1836daba81cb5ee6066a50c09e9d6839621a53c8 100755 (executable)
@@ -99,6 +99,7 @@ __EOF__
 esac
                
 export port
+export context
 
 ## TODO: give pdns a few seconds to startup or fail, then check if it did not fail
 ## TODO: give sdig a timeout
diff --git a/regression-tests/too-big-for-udp-query-no-truncate-additional/expected_result.bind b/regression-tests/too-big-for-udp-query-no-truncate-additional/expected_result.bind
new file mode 100644 (file)
index 0000000..5f9f313
--- /dev/null
@@ -0,0 +1,28 @@
+0      together-too-much.example.com.  IN      MX      120     25 toomuchinfo-a.example.com.
+0      together-too-much.example.com.  IN      MX      120     25 toomuchinfo-b.example.com.
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.1
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.10
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.11
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.12
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.13
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.14
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.15
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.16
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.17
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.18
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.19
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.2
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.20
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.21
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.22
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.23
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.24
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.25
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.3
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.4
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.5
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.6
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.7
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.8
+Rcode: 0, RD: 0, QR: 1, TC: 0, AA: 1, opcode: 0
+Reply to question for qname='together-too-much.example.com.', qtype=MX
diff --git a/regression-tests/too-big-for-udp-query-no-truncate-additional/expected_result.bind-gsqlite3 b/regression-tests/too-big-for-udp-query-no-truncate-additional/expected_result.bind-gsqlite3
new file mode 100644 (file)
index 0000000..5f9f313
--- /dev/null
@@ -0,0 +1,28 @@
+0      together-too-much.example.com.  IN      MX      120     25 toomuchinfo-a.example.com.
+0      together-too-much.example.com.  IN      MX      120     25 toomuchinfo-b.example.com.
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.1
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.10
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.11
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.12
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.13
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.14
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.15
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.16
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.17
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.18
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.19
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.2
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.20
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.21
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.22
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.23
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.24
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.25
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.3
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.4
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.5
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.6
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.7
+2      toomuchinfo-a.example.com.      IN      A       120     192.168.99.8
+Rcode: 0, RD: 0, QR: 1, TC: 0, AA: 1, opcode: 0
+Reply to question for qname='together-too-much.example.com.', qtype=MX