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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user