blob: 30efd39f0e89a54e51d134bb1abc662b167566f6 [file] [log] [blame]
Gary Wu9abb61c2018-09-27 10:38:50 -07001#!/bin/bash
2
3curl localhost:9200/_cluster/health?pretty=true
4
kaihlavib52c1a92019-05-27 16:51:09 +03005echo "BE Health Check:"
Gary Wu9abb61c2018-09-27 10:38:50 -07006curl http://localhost:8080/sdc2/rest/healthCheck
7
8echo ""
9echo ""
kaihlavib52c1a92019-05-27 16:51:09 +030010echo "FE Health Check:"
Gary Wu9abb61c2018-09-27 10:38:50 -070011curl http://localhost:8181/sdc1/rest/healthCheck
12
Gary Wu9abb61c2018-09-27 10:38:50 -070013echo ""
14echo ""
15http_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;)
16if [[ ${http_code} != 200 ]]
17then
kaihlavib52c1a92019-05-27 16:51:09 +030018 echo "Error [${http_code}] while checking existence of user"
Gary Wu9abb61c2018-09-27 10:38:50 -070019 return ${http_code}
20fi
kaihlavib52c1a92019-05-27 16:51:09 +030021echo "Check user existence: OK"
Gary Wu9abb61c2018-09-27 10:38:50 -070022