#!/usr/bin/env bash # Convenience wrapper: make sure the shared test Postgres is up, then run the # suite. CM_TEST_DATABASE_URL is supplied automatically by .cargo/config.toml, # so `cargo test` — with OR without this wrapper — points at the shared server # and spawns zero testcontainers. This wrapper just guarantees the server is up # and trims leftover test_ databases before running. set -euo pipefail ROOT="$(cd "$(dirname "$0")/.." && pwd)" "$ROOT/scripts/test-server.sh" up "$ROOT/scripts/test-server.sh" clean cd "$ROOT" status=0 if command -v cargo-nextest >/dev/null 2>&1; then cargo nextest run "$@" || status=$? else cargo test "$@" || status=$? fi exit "$status"