fix return value for test shell scripts

pull/651/head
JacobBarthelmeh 2024-01-29 16:40:35 -07:00
parent 3a3a49c7cb
commit b662bcaaf1
4 changed files with 5 additions and 5 deletions

View File

@ -13,7 +13,7 @@ PUBLIC_KEY="./keys/hansel-key-ecc.pub"
if [ -z "$1" ] || [ -z "$2" ]; then
echo "expecting host and port as arguments"
echo "./error_return.sh 127.0.0.1 22222"
exit -1
exit 1
fi
echo "$TEST_CLIENT -c 'bash -c \"(exit 2)\"' -u $USER -i $PRIVATE_KEY -j $PUBLIC_KEY -h \"$1\" -p \"$2\""

View File

@ -13,7 +13,7 @@ PUBLIC_KEY="./keys/hansel-key-ecc.pub"
if [ -z "$1" ] || [ -z "$2" ]; then
echo "expecting host and port as arguments"
echo "./sshd_exec_test.sh 127.0.0.1 22222"
exit -1
exit 1
fi
set -e

View File

@ -5,7 +5,7 @@
if [ -z "$1" ] || [ -z "$2" ]; then
echo "expecting host and port as arguments"
echo "./sshd_exec_test.sh 127.0.0.1 22222"
exit -1
exit 1
fi
PWD=`pwd`
@ -42,7 +42,7 @@ cat $RESULT | grep bob
RESULT=$?
if [ "$RESULT" == 0 ]; then
echo "Shell login should fail with forced command"
exit -1
exit 1
fi
set -e

View File

@ -8,7 +8,7 @@ cd ../../..
if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then
echo "expecting host, port and user as arguments"
echo "./sshd_x509_text.sh 127.0.0.1 22222 user"
exit -1
exit 1
fi
TEST_CLIENT="./examples/client/client"