Files
k8s-manifests/n8n/postsync-smoke-test.yaml
T

33 lines
935 B
YAML

apiVersion: batch/v1
kind: Job
metadata:
name: postsync-smoke-test
namespace: n8n
annotations:
argocd.argoproj.io/hook: PostSync
argocd.argoproj.io/hook-delete-policy: HookSucceeded
spec:
ttlSecondsAfterFinished: 600
backoffLimit: 0
template:
spec:
restartPolicy: Never
containers:
- name: smoke-test
image: curlimages/curl:latest
command: ["/bin/sh", "-c"]
args:
- |
set -e
BASE="http://n8n.n8n.svc.cluster.local:5678"
echo "--- [1/1] GET /healthz ---"
HEALTH=$(curl -sf --max-time 15 --retry 3 --retry-delay 5 --retry-all-errors \
"$BASE/healthz")
echo "$HEALTH"
echo "$HEALTH" | grep -qF '"status":"ok"' \
|| { echo "FAIL: n8n health check did not return status ok"; exit 1; }
echo "OK"
echo "=== n8n: all smoke tests passed ==="