]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fail early in doth system test when the expected failure doesn't happen
authorAram Sargsyan <aram@isc.org>
Tue, 7 Mar 2023 14:03:35 +0000 (14:03 +0000)
committerAram Sargsyan <aram@isc.org>
Thu, 9 Mar 2023 10:40:31 +0000 (10:40 +0000)
If wait_for_tls_xfer succeeds, while a failure was being expected,
set ret=1 to fail without further checking if the zone file exists.

(cherry picked from commit 2fdf01573c11ec3cf4105ba15ad42b925dff5cf9)

bin/tests/system/doth/tests.sh

index d22f0ef6497b23287eb40b93272c7a62fc451282..1e20cf16fe5ed41d5a2d456f88d6813fa9cd6fca 100644 (file)
@@ -111,7 +111,7 @@ if [ -n "$run_san_tests" ]; then
        ret=0
        if retry_quiet 10 wait_for_tls_xfer 2 example3; then
                grep "^;" "dig.out.ns2.example3.test$n" | cat_i
-               test -f "ns2/example3.db" && ret=1
+               ret=1
        else
                echo_i "timed out waiting for zone transfer"
        fi
@@ -163,7 +163,7 @@ echo_i "testing incoming XoT functionality (from the first secondary, wrong host
 ret=0
 if retry_quiet 10 wait_for_tls_xfer 2 example7; then
        grep "^;" "dig.out.ns2.example7.test$n" | cat_i
-       test -f "ns2/example7.db" && ret=1
+       ret=1
 else
        echo_i "timed out waiting for zone transfer"
 fi
@@ -175,7 +175,7 @@ echo_i "testing incoming XoT functionality (from the first secondary, expired ce
 ret=0
 if retry_quiet 10 wait_for_tls_xfer 2 example8; then
        grep "^;" "dig.out.ns2.example8.test$n" | cat_i
-       test -f "ns2/example8.db" && ret=1
+       ret=1
 else
        echo_i "timed out waiting for zone transfer"
 fi
@@ -200,7 +200,7 @@ echo_i "testing incoming XoT functionality (from the first secondary, MutualTLS,
 ret=0
 if retry_quiet 10 wait_for_tls_xfer 2 example10; then
        grep "^;" "dig.out.ns2.example10.test$n" | cat_i
-       test -f "ns2/example10.db" && ret=1
+       ret=1
 else
        echo_i "timed out waiting for zone transfer"
 fi
@@ -212,7 +212,7 @@ echo_i "testing incoming XoT functionality (from the first secondary, MutualTLS,
 ret=0
 if retry_quiet 10 wait_for_tls_xfer 2 example11; then
        grep "^;" "dig.out.ns2.example11.test$n" | cat_i
-       test -f "ns2/example11.db" && ret=1
+       ret=1
 else
        echo_i "timed out waiting for zone transfer"
 fi
@@ -237,7 +237,7 @@ echo_i "testing incoming XoT functionality (from the second secondary, mismatchi
 ret=0
 if retry_quiet 10 wait_for_tls_xfer 3 example2; then
        grep "^;" "dig.out.ns3.example2.test$n" | cat_i
-       test -f "ns3/example2.db" && ret=1
+       ret=1
 else
        echo_i "timed out waiting for zone transfer"
 fi