X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=test%2Fsecurity.test;h=fb783b06fb0949e554e706b6e009b11cf81d4688;hb=df716df33af8e9a5b93d573a023ecd7fc24d9a03;hp=76b825dc2e5e52c1274572c7232cfa3770251424;hpb=4ca3ecb6d5c0667eba68313a5ca24e73dcc8e9e4;p=tinc diff --git a/test/security.test b/test/security.test index 76b825dc..fb783b06 100755 --- a/test/security.test +++ b/test/security.test @@ -1,19 +1,19 @@ #!/bin/sh -# shellcheck source=testlib.sh -. ./testlib.sh +# shellcheck disable=SC1090 +. "$TESTLIB_PATH" echo [STEP] Skip this test if tools are missing -command -v nc >/dev/null || exit $EXIT_SKIP_TEST -command -v timeout >/dev/null || exit $EXIT_SKIP_TEST +command -v nc >/dev/null || exit "$EXIT_SKIP_TEST" +command -v timeout >/dev/null || exit "$EXIT_SKIP_TEST" foo_port=30050 bar_port=30051 # usage: splice protocol_version splice() { - ./splice foo localhost $foo_port bar localhost $bar_port "$1" & + "$SPLICE_PATH" foo localhost $foo_port bar localhost $bar_port "$1" & sleep 10 } @@ -29,7 +29,7 @@ send_with_timeout() { ) | timeout 10 nc localhost $foo_port ) && exit 1 - test $? = $EXIT_TIMEOUT + test $? = "$EXIT_TIMEOUT" if [ -z "$expected" ]; then test -z "$result"