aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit/scripts/sdc/docker_health.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/csit/scripts/sdc/docker_health.sh')
-rw-r--r--test/csit/scripts/sdc/docker_health.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/csit/scripts/sdc/docker_health.sh b/test/csit/scripts/sdc/docker_health.sh
index 832b25a23..4264b1a59 100644
--- a/test/csit/scripts/sdc/docker_health.sh
+++ b/test/csit/scripts/sdc/docker_health.sh
@@ -13,11 +13,11 @@ curl http://localhost:8181/sdc1/rest/healthCheck
echo ""
echo ""
-res=`curl -s -X GET -H "Accept: application/json" -H "Content-Type: application/json" -H "USER_ID: jh0003" "http://localhost:8080/sdc2/rest/v1/user/demo" | wc -l`
-if [[ ${res} != 0 ]]
+http_code=$(curl -o out.html -w '%{http_code}' -H "Accept: application/json" -H "Content-Type: application/json" -H "USER_ID: jh0003" http://localhost:8080/sdc2/rest/v1/user/demo;)
+if [[ ${http_code} != 200 ]]
then
- echo "Error [${res}] while user existance check"
- exit ${res}
+ echo "Error [${http_code}] while user existance check"
+ return ${http_code}
fi
echo "check user existance: OK"