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 ---"
HEALTH=$(curl -sf --max-time 15 --retry 3 --retry-delay 5 --retry-all-errors \
"$BASE/healthz") || fail "GET /healthz unreachable"
echo "$HEALTH"
echo "$HEALTH" | grep -qF '"status":"ok"' \
|| fail "health response missing status:ok"
RESULT=""
for i in $(seq 1 12); do
RESULT=$(curl -sf --max-time 10 "$BASE/healthz" 2>/dev/null) && break
echo "Waiting... (attempt $i/12)"
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"
notify "[OK] n8n PostSync passed"