diff --git a/n8n/postsync-smoke-test.yaml b/n8n/postsync-smoke-test.yaml new file mode 100644 index 0000000..d2b31f6 --- /dev/null +++ b/n8n/postsync-smoke-test.yaml @@ -0,0 +1,32 @@ +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 ===" diff --git a/polymarket-bot/postsync-smoke-test.yaml b/polymarket-bot/postsync-smoke-test.yaml new file mode 100644 index 0000000..633942e --- /dev/null +++ b/polymarket-bot/postsync-smoke-test.yaml @@ -0,0 +1,43 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: postsync-smoke-test + namespace: polymarket-bot + 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 + API="http://api.polymarket-bot.svc.cluster.local:8000" + DASH="http://dashboard.polymarket-bot.svc.cluster.local:80" + + echo "--- [1/3] GET /api/summary ---" + SUMMARY=$(curl -sf --max-time 15 --retry 3 --retry-delay 5 --retry-all-errors \ + "$API/api/summary") + echo "$SUMMARY" + echo "$SUMMARY" | grep -qF '"paper_mode": true' \ + || { echo "FAIL: paper_mode is not true"; exit 1; } + echo "OK" + + echo "--- [2/3] GET /api/trades?status=open ---" + curl -sf --max-time 15 --retry 3 --retry-delay 5 --retry-all-errors \ + "$API/api/trades?status=open" > /dev/null + echo "OK" + + echo "--- [3/3] Dashboard HTTP 200 ---" + curl -sf --max-time 15 --retry 3 --retry-delay 5 --retry-all-errors \ + "$DASH/" > /dev/null + echo "OK" + + echo "=== polymarket-bot: all smoke tests passed ===" diff --git a/portfolio/postsync-smoke-test.yaml b/portfolio/postsync-smoke-test.yaml new file mode 100644 index 0000000..f68407f --- /dev/null +++ b/portfolio/postsync-smoke-test.yaml @@ -0,0 +1,29 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: postsync-smoke-test + namespace: portfolio + 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://portfolio.portfolio.svc.cluster.local:80" + + echo "--- [1/1] GET / (HTTP 200) ---" + curl -sf --max-time 15 --retry 3 --retry-delay 5 --retry-all-errors \ + "$BASE/" > /dev/null + echo "OK" + + echo "=== portfolio: all smoke tests passed ==="