The shared fixture (Heimdall.TestCommon) was refactored from per-project
fixtures but lost the DATABASE_URL env var check. Without it, the fixture
always starts a Testcontainers PostgreSQL container, which fails in CI
when Docker disk space is exhausted (initdb: No space left on device).
Now checks DATABASE_URL first — if set (CI mode), skips Testcontainers
and uses the CI-provided PostgreSQL service. Falls back to Testcontainers
for local development.
Use a static PostgreSqlContainer with reference counting so both
Infrastructure and Integration test projects share one PostgreSQL
container instead of each starting their own. Fixes resource
conflict in CI where only the first test project could connect.
Create Heimdall.TestCommon project with a single PostgreSqlContainerFixture
shared by both Infrastructure and Integration tests. This prevents Docker
resource conflicts from starting two PostgreSQL containers and ensures
both test suites connect to the same database instance.
- Move shared fixture to tests/Heimdall.TestCommon
- Remove duplicate fixtures from each test project
- Keep test isolation (truncation) and FK fix from previous commit
- Revert DATABASE_URL env var check (Testcontainers works in CI)