Fail early in doth system test when the expected failure doesn't happen

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.
This commit is contained in:
Aram Sargsyan
2023-03-07 14:03:35 +00:00
committed by Arаm Sаrgsyаn
parent e6af4a1030
commit 2fdf01573c

View 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