aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit/scripts/sdc/docker_health.sh
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2018-01-19 02:29:22 +0000
committerGerrit Code Review <gerrit@onap.org>2018-01-19 02:29:22 +0000
commite60d218d8a9ca0700e4b1d117ddf7b59fa18194a (patch)
treeee4a5a69c81deb6e1386e8a0fbd86050495a192d /test/csit/scripts/sdc/docker_health.sh
parent60dd0d84290b33e00fd5d4a05367670e8d5b4d6f (diff)
parenta2d8b3bf42f2ea4f82790e0c86d2ce744657310c (diff)
Merge "Add branch support for sdc csit"
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"