Expand description
Shared live-test database harness for ARES integration tests.
One resolver, one lifecycle, one failure policy for every crate’s live
Postgres tests (ares_test):
- URL resolution:
TEST_DATABASE_URL->DATABASE_URL(postgres URLs only, rewritten toares_test) -> unix-socket peer auth, no credentials needed. - Lifecycle: once per test binary — connect, run migrations, truncate; the
tables are truncated again when the binary exits, so
ares_testis left empty between runs. - Failure policy: a configured-but-unreachable database fails loudly with fix instructions instead of panicking mid-test or silently skipping.
Functions§
- client
- A fresh connection wrapped as
ares_store::PostgresClient. - pool
- Connect to
ares_test. - test_
db_ url - Returns the test database URL.