Skip to main content

1.7 Smoke tests

Outcome

You've confirmed every key surface of the empty platform behaves correctly before onboarding the first customer.

Prerequisites

What "good" looks like for an empty platform

Smoke checks

  1. Health and metrics endpoints

    curl -fsSL https://api.rcm.medsuite.com/health
    curl -fsSL https://edi.medsuite.com/health
    curl -fsSL https://api.rcm.medsuite.com/metrics | head -20
    curl -fsSL https://api.rcm.medsuite.com/healthz/sampled-tenants

    The sampled-tenants endpoint should return zero entries — the sampler walks identity.tenant, which is empty.

  2. Sign in as platform admin

    Browser: https://admin.rcm.medsuite.com → email + password from 1.5 First platform admin → land on the tenant picker (empty list).

    Confirm identity.tenant_audit got a PLATFORM_LOGIN_SUCCESS row.

  3. API smoke via the platform JWT

    TOKEN=$(curl -s -X POST https://api.rcm.medsuite.com/platform/auth/login \
    -H 'content-type: application/json' \
    -d '{"email":"you@medsuite.com","password":"<your password>"}' \
    | jq -r .data.platformToken)

    curl -fsSL https://api.rcm.medsuite.com/platform/tenants \
    -H "Authorization: Bearer $TOKEN" | jq .

    Expect {"data":[],"meta":{"total":0}}.

  4. Reference-data spot check

    A platform admin can read reference data without impersonation:

    curl -fsSL https://api.rcm.medsuite.com/admin/payers \
    -H "Authorization: Bearer $TOKEN" | jq '.data | length'

    curl -fsSL https://api.rcm.medsuite.com/admin/procedure-codes?limit=5 \
    -H "Authorization: Bearer $TOKEN" | jq '.data | length'

    Both should be > 0 (seeded by master migrations).

  5. Worker / job-supervisor heartbeat

    curl -fsSL https://api.rcm.medsuite.com/healthz/worker | jq .

    Expect a lastHeartbeatAt within the last 30 seconds and activeWorkers >= 1.

  6. EDI gateway smoke

    curl -fsSL https://edi.medsuite.com/healthz/x12 | jq .
    # expect: { "parsers":["837","270","271","278","835","277CA"], "ready":true }

Validation matrix

SurfaceExpected
/health (rcm-core)200
/health (edi-gateway)200
/metrics (rcm-core)Prometheus text
admin.rcm login200, tenant picker empty
/platform/tenants[]
/admin/payersnon-empty
/admin/procedure-codesnon-empty
/healthz/workerrecent heartbeat
/healthz/x12parsers ready

Troubleshooting

If anything fails, head to 1.8 Troubleshooting.

Next

You're done with Phase 1.

Continue to Phase 2 — Customer Onboarding.