Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | curl localhost:9200/_cluster/health?pretty=true |
| 4 | |
kaihlavi | b52c1a9 | 2019-05-27 16:51:09 +0300 | [diff] [blame] | 5 | echo "BE Health Check:" |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 6 | curl http://localhost:8080/sdc2/rest/healthCheck |
| 7 | |
| 8 | echo "" |
| 9 | echo "" |
kaihlavi | b52c1a9 | 2019-05-27 16:51:09 +0300 | [diff] [blame] | 10 | echo "FE Health Check:" |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 11 | curl http://localhost:8181/sdc1/rest/healthCheck |
| 12 | |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 13 | echo "" |
| 14 | echo "" |
| 15 | 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;) |
| 16 | if [[ ${http_code} != 200 ]] |
| 17 | then |
kaihlavi | b52c1a9 | 2019-05-27 16:51:09 +0300 | [diff] [blame] | 18 | echo "Error [${http_code}] while checking existence of user" |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 19 | return ${http_code} |
| 20 | fi |
kaihlavi | b52c1a9 | 2019-05-27 16:51:09 +0300 | [diff] [blame] | 21 | echo "Check user existence: OK" |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 22 | |