Skip to content

Commit

Permalink
fix return value for test shell scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobBarthelmeh committed Jan 29, 2024
1 parent 3a3a49c commit b662bca
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion apps/wolfsshd/test/error_return.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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\""
Expand Down
2 changes: 1 addition & 1 deletion apps/wolfsshd/test/sshd_exec_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions apps/wolfsshd/test/sshd_forcedcmd_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion apps/wolfsshd/test/sshd_x509_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit b662bca

Please sign in to comment.