Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix return value for test shell scripts #651

Merged
merged 1 commit into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading