test(federation): integration tests for federated tier gateway boot (FED-M1-07) #476
Reference in New Issue
Block a user
Delete Branch "feat/federation-m1-integration"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
FED-M1-07 — Adds three integration tests that exercise the federated tier against a live docker-compose
federatedprofile. Real services, no mocks.Tests
federated-boot.success.integration.test.tsdetectAndAssertTierresolves;pg_extensionrow forvectorexistsfederated-boot.pg-unreachable.integration.test.tsTierDetectionErrorwithservice: 'postgres'when PG port is closedfederated-pgvector.integration.test.tsvector(3)column round-trips[1,2,3]Skip gating
All three tests are gated behind
process.env.FEDERATED_INTEGRATION === '1'usingdescribe.skipIf(!run). Runningpnpm testwithout the env var skips them cleanly (4 tests, all skipped, exit 0). CI prologue is responsible for compose lifecycle — tests do not manage docker.Closed-port reservation
Test B uses
net.createServer().listen(0)to reserve an ephemeral port and immediately release it, then targets that port. This avoids host-port collisions with other Postgres clusters that an arbitrary "5499" assumption would have risked (caught by independent code review).Code review feedback addressed
Independent sonnet review (VERDICT: B) flagged two IMPORTANT items, both fixed in this PR:
afterAllandsqlscoped outsidedescribe→ moved both insidedescribe.skipIfblock; cleanup only runs when describe activatesVerification
Independent surface verification (haiku) confirmed file paths, imports, skip pattern, no new dependencies, lint + typecheck pass.
Test plan
FEDERATED_INTEGRATION=1Refs #460