From 3f176d327cf671e6bcbae1eca7c47c01d37140aa Mon Sep 17 00:00:00 2001 From: Yuli Date: Mon, 27 Jan 2020 12:53:55 +0200 Subject: [PATCH] fix bash script --- create-test-user.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/create-test-user.sh b/create-test-user.sh index 7d99741..7c23ed5 100755 --- a/create-test-user.sh +++ b/create-test-user.sh @@ -27,12 +27,12 @@ RESULT=`curl -s http://localhost:3000/v1/user \ -H "X-Bunker-Token: $XTOKEN" -H "Content-Type: application/json" \ -d '{"fname":"Test","lname":"Account","email":"test@paranoidguy.com","phone":"4444"}'` STATUS=`echo $RESULT | jq ".status" | tr -d '"'` -if [ "$STATUS" == "error" ]; then +if [ "$STATUS" = "error" ]; then echo "Error to create user, trying to lookup by email." RESULT=`curl -s http://localhost:3000/v1/user/email/test@paranoidguy.com -H "X-Bunker-Token: $XTOKEN"` STATUS=`echo $RESULT | jq ".status" | tr -d '"'` fi -if [ "$STATUS" == "error" ]; then +if [ "$STATUS" = "error" ]; then echo "Failed to fetch user by email, got: $RESULT" exit fi