generated from arafkarsh/ms-springboot-324-java-22-jakarta-ee-10
-
Notifications
You must be signed in to change notification settings - Fork 4
/
test
executable file
·38 lines (36 loc) · 2.41 KB
/
test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh
# -------------------------------------------------------------------------------------------
# @author: Araf Karsh Hamid
# -------------------------------------------------------------------------------------------
PORT=9090
API_VERSION=v1
SERVICE=`getServiceName 3`
echo "---------------------------------------------------------------------------------------"
echo "Testing $SERVICE Microservice"
echo "---------------------------------------------------------------------------------------"
echo "---------------------------------------------------------------------------------------"
echo "curl -X 'GET' localhost:$PORT/$SERVICE/api/$API_VERSION/service/home -H 'accept: application/json'"
curl -X 'GET' localhost:$PORT/$SERVICE/api/$API_VERSION/service/home -H 'accept: application/json'
echo ""
echo "---------------------------------------------------------------------------------------"
echo "curl -X 'GET' localhost:$PORT/$SERVICE/api/$API_VERSION/service/live -H 'accept: application/json'"
curl -X 'GET' localhost:$PORT/$SERVICE/api/$API_VERSION/service/live -H 'accept: application/json'
echo ""
echo "---------------------------------------------------------------------------------------"
echo "curl -X 'GET' localhost:$PORT/$SERVICE/api/$API_VERSION/service/ready -H 'accept: application/json'"
curl -X 'GET' localhost:$PORT/$SERVICE/api/$API_VERSION/service/ready -H 'accept: application/json'
echo ""
echo "---------------------------------------------------------------------------------------"
echo "curl -X 'POST' localhost:$PORT/$SERVICE/api/$API_VERSION/service/restart -H 'accept: application/json'"
curl -X 'POST' localhost:$PORT/$SERVICE/api/$API_VERSION/service/restart -H 'accept: application/json'
echo ""
echo "---------------------------------------------------------------------------------------"
sleep 3
echo "curl -X 'GET' localhost:$PORT/$SERVICE/api/$API_VERSION/service/home -H 'accept: application/json'"
curl -X 'GET' localhost:$PORT/$SERVICE/api/$API_VERSION/service/home -H 'accept: application/json'
echo ""
echo "---------------------------------------------------------------------------------------"
echo "curl -X 'GET' localhost:$PORT/$SERVICE/api/$API_VERSION/service/ready -H 'accept: application/json'"
curl -X 'GET' localhost:$PORT/$SERVICE/api/$API_VERSION/service/ready -H 'accept: application/json'
echo ""
echo "---------------------------------------------------------------------------------------"