just test # all tests
just test-integration # wr-tests crate only
just test-one <test_name> # single test by name
just test-db # integration tests with a local Postgres instanceThe wr-tests crate contains integration tests that spin up in-process instances of all three services on random ports — no external processes or files required:
- Manager RPC coverage (register, deregister, heartbeat, routing rules, metrics)
- Proxy routing end-to-end with a stub engine
- Schema validation: invalid protobuf bodies rejected with
400; unknown method paths rejected with404; missing schema returns503 - All three example TOML files parse without error
- Version routing:
x-wr-versionheader routes to the correct instance; no header routes to the highest semver - Returns 503 when the requested version has no healthy instance
- Load balancing: requests distributed across multiple instances of the same
(module, version) - Failover: deregistering an instance immediately redirects traffic to remaining healthy instances
- Full failure: 503 when all instances are unhealthy
- Cross-node routing: request originating on Node A is relayed to Node B's proxy when the destination engine lives on Node B; schema validation is skipped on the second hop (
x-wr-via-proxy)
Docker Compose provides Postgres, Grafana/LGTM, and RustFS S3 for local development and testing:
just dev-up # start all dev services
just dev-down # stop all dev services
just dev-logs # tail logs from all services
just dev-logs postgres # tail logs from a single service
just dev-ps # show running container status
just dev-reset-db # drop all module schemas, manager tables, and migration history