Improve ledger filters and dev sync checks
This commit is contained in:
@@ -12,6 +12,7 @@ echo "[smoke] running 8081 endpoint checks"
|
||||
docker exec mh-dashboard-organization-dev-backend-1 python - <<'PY'
|
||||
import sys
|
||||
import urllib.request
|
||||
import json
|
||||
|
||||
|
||||
checks = [
|
||||
@@ -43,6 +44,21 @@ for name, url, needle in checks:
|
||||
except Exception as exc:
|
||||
failed.append(f"{name}: {exc}")
|
||||
|
||||
try:
|
||||
with urllib.request.urlopen("http://127.0.0.1:8000/api/integration/summary", timeout=8) as response:
|
||||
payload = json.loads(response.read().decode())
|
||||
counts = payload.get("counts") or {}
|
||||
work_logs = int(counts.get("work_logs") or 0)
|
||||
vouchers = int(counts.get("vouchers") or 0)
|
||||
if work_logs <= 0:
|
||||
failed.append(f"analysis-summary: work_logs is {work_logs}")
|
||||
if vouchers <= 0:
|
||||
failed.append(f"analysis-summary: vouchers is {vouchers}")
|
||||
if work_logs > 0 and vouchers > 0:
|
||||
print(f"[ok] analysis-summary -> work_logs={work_logs}, vouchers={vouchers}")
|
||||
except Exception as exc:
|
||||
failed.append(f"analysis-summary: {exc}")
|
||||
|
||||
if failed:
|
||||
print("[smoke] failures detected:")
|
||||
for item in failed:
|
||||
|
||||
Reference in New Issue
Block a user