-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.test
39 lines (36 loc) · 1.31 KB
/
Makefile.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
39
DEV_VS_STATS_PATH := "/mgmt/tm/ltm/virtual/~as3_openapi_dev~as3_vs_httpbin_proxy_app~as3_vs_httpbin_proxy_svc/stats"
DEV_VS_IP := "192.168.0.211"
test-in-dev:
@echo "Checking dev VS status..."
@if timeout 10 bash -c ' \
until [ "$$(curl -sk -u admin:admin https://bigip.home.internal:8443$(DEV_VS_STATS_PATH) | \
jq -r ".entries[\"https://localhost$(DEV_VS_STATS_PATH)\"].nestedStats.entries.\"status.availabilityState\".description")" = "available" ]; \
do \
sleep 1; \
done' \
; then \
echo "Success: dev VS status is available"; \
else \
echo "Failed: dev VS status is NOT available"; \
exit 1; \
fi
@echo "Send test traffic to dev VS"
curl -s --fail $(DEV_VS_IP)/get
VS_STATS_PATH := "/mgmt/tm/ltm/virtual/~as3_openapi~as3_vs_httpbin_proxy_app~as3_vs_httpbin_proxy_svc/stats"
VS_IP := "192.168.0.201"
test:
@echo "Checking VS status..."
@if timeout 10 bash -c ' \
until [ "$$(curl -sk -u admin:admin https://bigip.home.internal:8443$(VS_STATS_PATH) | \
jq -r ".entries[\"https://localhost$(VS_STATS_PATH)\"].nestedStats.entries.\"status.availabilityState\".description")" = "available" ]; \
do \
sleep 1; \
done' \
; then \
echo "Success: VS status is available"; \
else \
echo "Failed: VS status is NOT available"; \
exit 1; \
fi
@echo "Send test traffic to VS"
curl -s --fail $(VS_IP)/get