Skip to content
This repository has been archived by the owner on Dec 5, 2023. It is now read-only.

Commit

Permalink
Exit code should be one on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Vishal Lal committed Jan 27, 2017
1 parent 5d658a0 commit 7a02c90
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions runLocust.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ do_check() {
# check hostname is not empty
if [ "${TARGET_HOST}x" == "x" ]; then
echo "TARGET_HOST is not set; use '-h hostname:port'"
exit 0
exit 1
fi

# check for locust
if [ ! `command -v locust` ]; then
echo "Python 'locust' package is not found!"
exit 0
exit 1
fi

# check locust file is present
Expand All @@ -42,7 +42,7 @@ do_exec() {
STATUS=$(curl -s -o /dev/null -w "%{http_code}" ${TARGET_HOST})
if [ $STATUS -ne 200 ]; then
echo "${TARGET_HOST} is not accessible"
exit 0
exit 1
fi

echo "Will run $LOCUST_FILE against $TARGET_HOST. Spawning $CLIENTS clients and $REQUESTS total requests."
Expand Down

0 comments on commit 7a02c90

Please sign in to comment.