# Quickstart: Integration Test Infrastructure ## Run the full integration test suite (Docker, recommended) ```bash docker compose -f docker-compose.test.yml run --rm api-test ``` Test services start automatically. The command exits with pytest's return code. ## Run unit tests only (no Docker required) ```bash make test-unit # or directly: cd api && python -m pytest tests/unit/ -v ``` ## Run integration tests from the host (test services must be running) ```bash # Start test services docker compose -f docker-compose.test.yml up -d postgres-test minio-test minio-init-test # Copy and source test env vars cp .env.test.example .env.test export $(cat .env.test | xargs) # Run tests cd api && python -m pytest tests/integration/ -v ``` ## Validate the guard works ```bash TEST_DATABASE_URL=sqlite+aiosqlite:///test.db python -m pytest api/tests/integration/ # Expected: exits immediately with "Integration tests require postgresql+asyncpg://" ```