#!/usr/bin/env bash # author: simon-pierre boucher # Smoke-test a running Tendril deployment through its public URL (§16.4, §20). set -euo pipefail BASE="${1:-https://www.ten-dril.com}" echo "==> GET ${BASE}/healthz" curl -sf "${BASE}/healthz" | grep -q '"status":"ok"' && echo " healthz ok" echo "==> POST ${BASE}/v1/scrape (iana.org)" body="$(curl -sf -X POST "${BASE}/v1/scrape" -H 'content-type: application/json' \ -d '{"url":"https://www.iana.org","formats":["markdown"]}')" echo "$body" | grep -q "Internet Assigned Numbers Authority" && echo " scrape ok (found expected string)" echo "==> POST ${BASE}/v1/map (iana.org)" curl -sf -X POST "${BASE}/v1/map" -H 'content-type: application/json' \ -d '{"url":"https://www.iana.org","limit":5}' | grep -q '"success":true' && echo " map ok" echo "all smoke checks passed"