summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorVictor Engmark <vengmark@linz.govt.nz>2021-11-26 10:42:12 +1300
committerVictor Engmark <vengmark@linz.govt.nz>2021-11-26 10:52:28 +1300
commitbfc580f54fb90295f7375ae166446e334e6ebd17 (patch)
tree0bbfe66e13b3bdf1bb95a5a107fc60c0a7583ae2 /lib
parent40ae711f7387565b6be25d6d34424f9ede0154a0 (diff)
lib/tests: Don't return non-zero values from checks
The exit codes aren't used for anything.
Diffstat (limited to 'lib')
-rwxr-xr-xlib/tests/modules.sh5
1 files changed, 0 insertions, 5 deletions
diff --git a/lib/tests/modules.sh b/lib/tests/modules.sh
index 527e49032843..67d4e589bdef 100755
--- a/lib/tests/modules.sh
+++ b/lib/tests/modules.sh
@@ -32,11 +32,9 @@ checkConfigOutput() {
shift
if evalConfig "$@" 2>/dev/null | grep --silent "$outputContains" ; then
pass=$((pass + 1))
- return 0
else
echo 2>&1 "error: Expected result matching '$outputContains', while evaluating"
reportFailure "$@"
- return 1
fi
}
@@ -47,15 +45,12 @@ checkConfigError() {
if err="$(evalConfig "$@" 2>&1 >/dev/null)"; then
echo 2>&1 "error: Expected error code, got exit code 0, while evaluating"
reportFailure "$@"
- return 1
else
if echo "$err" | grep -zP --silent "$errorContains" ; then
pass=$((pass + 1))
- return 0
else
echo 2>&1 "error: Expected error matching '$errorContains', while evaluating"
reportFailure "$@"
- return 1
fi
fi
}