-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathtest-proxy-endpoints.sh
More file actions
executable file
·45 lines (42 loc) · 1.69 KB
/
test-proxy-endpoints.sh
File metadata and controls
executable file
·45 lines (42 loc) · 1.69 KB
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
39
40
41
42
43
44
45
echo "🔨 Testing curl command"
response=$(kubectl exec -n cortexflow $1 -- curl -s -o /dev/null -w "%{http_code}" http://localhost:9090/)
if [ "$response" -eq 200 ]; then
echo "✅ Server is working"
echo " Checking / endpoint"
kubectl exec -n cortexflow $1 -- curl -v http://localhost:9090/
else
echo "❌ Error in http response ERROR: $response. Service does not exists or is not exposed"
fi
echo
sleep 1.5
echo "🔨 Testing /health endpoint"
response=$(kubectl exec -n cortexflow $1 -- curl -s -o /dev/null -w "%{http_code}" http://localhost:9090/health)
if [ "$response" -eq 200 ]; then
echo "✅ Server is working"
echo " Checking /health endpoint"
kubectl exec -n cortexflow $1 -- curl -v http://localhost:9090/health
else
echo "❌ Error in http response ERROR: $response. Service does not exists or is not exposed"
fi
echo
sleep 1.5
echo "🔨 Testing /metrics endpoint"
response=$(kubectl exec -n cortexflow $1 -- curl -s -o /dev/null -w "%{http_code}" http://localhost:9090/metrics)
if [ "$response" -eq 200 ]; then
echo "✅ Server is working"
echo " Checking /metrics endpoint"
kubectl exec -n cortexflow $1 -- curl -v http://localhost:9090/metrics
else
echo "❌ Error in http response ERROR: $response. Service does not exists or is not exposed"
fi
echo
sleep 1.5
echo "🔨 Testing /status endpoint"
response=$(kubectl exec -n cortexflow $1 -- curl -s -o /dev/null -w "%{http_code}" http://localhost:9090/status)
if [ "$response" -eq 200 ]; then
echo "✅ Server is working"
echo " Checking /status endpoint"
kubectl exec -n cortexflow $1 -- curl -v http://localhost:9090/status
else
echo "❌ Error in http response ERROR: $response. Service does not exists or is not exposed"
fi