fix: retry loop up to 60s in n8n smoke test healthz check

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-20 14:14:40 +00:00
parent 25e064724c
commit 177d9e0f9a
+9 -5
View File
@@ -46,11 +46,15 @@ spec:
} }
echo "--- [1/1] GET /healthz ---" echo "--- [1/1] GET /healthz ---"
HEALTH=$(curl -sf --max-time 15 --retry 3 --retry-delay 5 --retry-all-errors \ RESULT=""
"$BASE/healthz") || fail "GET /healthz unreachable" for i in $(seq 1 12); do
echo "$HEALTH" RESULT=$(curl -sf --max-time 10 "$BASE/healthz" 2>/dev/null) && break
echo "$HEALTH" | grep -qF '"status":"ok"' \ echo "Waiting... (attempt $i/12)"
|| fail "health response missing status:ok" sleep 5
done
[ -n "$RESULT" ] || fail "GET /healthz unreachable after 60s"
echo "$RESULT"
echo "$RESULT" | grep -qF '"status":"ok"' || fail "healthz did not return status ok"
echo "OK" echo "OK"
notify "[OK] n8n PostSync passed" notify "[OK] n8n PostSync passed"