X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=test%2Fsecurity.test;h=fb783b06fb0949e554e706b6e009b11cf81d4688;hb=df716df33af8e9a5b93d573a023ecd7fc24d9a03;hp=ee7bd46dd30af7b2e79da393be738ea5c05369a6;hpb=09dda64ce99668c918fada04b9ad6bf9cd2ab104;p=tinc diff --git a/test/security.test b/test/security.test index ee7bd46d..fb783b06 100755 --- a/test/security.test +++ b/test/security.test @@ -1,18 +1,19 @@ #!/bin/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 } @@ -28,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"