Validation & Smoke Tests
Canonical infrastructure validation commands for staging and local environments.
Validation & Smoke Tests
Copy-paste-safe commands for validating ByteBite infrastructure after changes. Variables use names that are not Bash special variables.
Staging commands verified: 2026-09-08
Staging — DNS
dig +short edge.getbytebite.co
dig +short api.staging.getbytebite.co
dig +short staging.getbytebite.co
TENANT_HOST="smoke-$(date +%s).staging.getbytebite.co"
dig +short "${TENANT_HOST}"Expected: all resolve to 88.99.0.118 (directly or via edge.getbytebite.co).
Staging — TLS
Explicit host
echo | openssl s_client -connect api.staging.getbytebite.co:443 -servername api.staging.getbytebite.co 2>/dev/null | openssl x509 -noout -subject -issuer -datesWildcard host
TENANT_HOST="smoke-$(date +%s).staging.getbytebite.co"
echo | openssl s_client -connect "${TENANT_HOST}:443" -servername "${TENANT_HOST}" 2>/dev/null | openssl x509 -noout -subject -issuer -dates -ext subjectAltNameExpected: valid Let's Encrypt certificate covering *.staging.getbytebite.co.
Staging — HTTP → HTTPS redirect
curl -sI "http://staging.getbytebite.co/" | head -5
curl -sI "http://api.staging.getbytebite.co/health" | head -5Expected: 301 or 308 redirect to https://.
Staging — Health endpoints
curl -s "https://api.staging.getbytebite.co/health"
curl -s "https://api.staging.getbytebite.co/health/db"Expected: {"status":"ok","service":"bytebite-api"} and db status ok.
Staging — Explicit hosts
curl -sI "https://staging.getbytebite.co/" | head -3
curl -sI "https://docs.staging.getbytebite.co/" | head -3
curl -sI "https://dashboard.staging.getbytebite.co/" | head -3
curl -s "https://api.staging.getbytebite.co/health"All should return successful responses with valid TLS.
Staging — Same-origin API
curl -s "https://luigi.staging.getbytebite.co/api/health"
curl -s "https://mario.staging.getbytebite.co/api/health"
curl -s "https://dashboard.staging.getbytebite.co/api/health"Expected: {"status":"ok","service":"bytebite-api"}.
Staging — Seeded tenants
curl -s "https://luigi.staging.getbytebite.co/api/storefront/restaurant" | head -c 200
curl -s "https://mario.staging.getbytebite.co/api/storefront/restaurant" | head -c 200Expected: JSON with restaurant data.
Staging — Wildcard tenant
TENANT_HOST="smoke-$(date +%s).staging.getbytebite.co"
# DNS
dig +short "${TENANT_HOST}"
# TLS
echo | openssl s_client -connect "${TENANT_HOST}:443" -servername "${TENANT_HOST}" 2>/dev/null | openssl x509 -noout -subject
# HTTP redirect
curl -sI "http://${TENANT_HOST}/" | head -3
# Storefront (unknown tenant)
curl -sI "https://${TENANT_HOST}/" | head -5
# Same-origin API health (no tenant required)
curl -s "https://${TENANT_HOST}/api/health"
# Tenant-aware API (unknown tenant)
curl -s -o /dev/null -w "%{http_code}" "https://${TENANT_HOST}/api/storefront/restaurant"Expected:
| Check | Expected |
|---|---|
| DNS | 88.99.0.118 |
| TLS | Valid wildcard cert |
| HTTP | Redirect to HTTPS |
| Storefront | HTTP 200, "Restaurant not found" (known application gap) |
/api/health | HTTP 200, {"status":"ok",...} |
/api/storefront/restaurant | HTTP 404 |
Staging — Reserved host precedence
After wildcard rollout, explicit hosts must still work:
for HOST in api.staging.getbytebite.co docs.staging.getbytebite.co dashboard.staging.getbytebite.co luigi.staging.getbytebite.co mario.staging.getbytebite.co; do
echo "=== ${HOST} ==="
curl -sI "https://${HOST}/" | head -2
doneStaging — Public port checks
From an external machine (not the APP VM):
nc -z -w 3 88.99.0.118 80 && echo "80 OPEN" || echo "80 CLOSED"
nc -z -w 3 88.99.0.118 443 && echo "443 OPEN" || echo "443 CLOSED"
nc -z -w 3 88.99.0.118 3000 && echo "3000 OPEN" || echo "3000 CLOSED"
nc -z -w 3 88.99.0.118 3001 && echo "3001 OPEN" || echo "3001 CLOSED"
nc -z -w 3 88.99.0.118 3002 && echo "3002 OPEN" || echo "3002 CLOSED"
nc -z -w 3 88.99.0.118 5432 && echo "5432 OPEN" || echo "5432 CLOSED"
nc -z -w 3 88.99.0.118 8080 && echo "8080 OPEN" || echo "8080 CLOSED"Expected: 80 and 443 OPEN; all others CLOSED.
Staging — noindex headers
curl -sI "https://staging.getbytebite.co/" | grep -i robots
curl -sI "https://luigi.staging.getbytebite.co/" | grep -i robots
curl -sI "https://dashboard.staging.getbytebite.co/" | grep -i robots
curl -sI "https://docs.staging.getbytebite.co/" | grep -i robotsExpected: X-Robots-Tag: noindex, nofollow.
Local — basic health
With pnpm dev running:
curl -s "http://api.bytebite.test/health"
curl -s "http://luigi.bytebite.test/api/health"
curl -s "http://dashboard.bytebite.test/api/health"Local — IPv6 hosts check
If requests to .bytebite.test hosts take ~5 seconds on macOS, verify /etc/hosts contains both 127.0.0.1 and ::1 entries. See Local deployment.
Related
- Troubleshooting — when tests fail
- Operations — when to run tests
- TLS — certificate details