summaryrefslogtreecommitdiffstats
path: root/integration-tests/catalog-be-resources/ready-probe.sh
diff options
context:
space:
mode:
Diffstat (limited to 'integration-tests/catalog-be-resources/ready-probe.sh')
-rw-r--r--integration-tests/catalog-be-resources/ready-probe.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/integration-tests/catalog-be-resources/ready-probe.sh b/integration-tests/catalog-be-resources/ready-probe.sh
new file mode 100644
index 0000000000..bb730ab272
--- /dev/null
+++ b/integration-tests/catalog-be-resources/ready-probe.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+health_check_http_code=$(curl -k --max-time 5 -o /dev/null -w '%{http_code}' http://127.0.0.1:8080/sdc2/rest/healthCheck)
+
+if [ "$health_check_http_code" -eq 200 ]; then
+ exit 0
+else
+ echo "Health check http status: $health_check_http_code"
+ exit 1
+fi