refactor(test): share container fixtures across the integration and e2e suites
Why: - tests/e2e/ cannot reach fixtures defined in a per-boundary conftest, and `pytest_plugins` is only honoured in the root conftest. Changes: - move the Postgres/MinIO/Qdrant container fixtures into tests/support/containers.py and register it as a root plugin - fold MinIO bucket creation into `minio_settings`; an autouse fixture in a globally registered plugin would pull a container into unit runs - add a `postgres_settings` fixture so a component can be built from it directly Impact: - no behavior change; `pytest -m unit` still needs no Docker Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,12 @@ from httpx import ASGITransport, AsyncClient
|
||||
from src.config import Settings
|
||||
from src.main import create_app
|
||||
|
||||
# Disposable Postgres/MinIO/Qdrant containers (ADR-0016). Registered here
|
||||
# because `pytest_plugins` is only honoured in the root conftest, and both
|
||||
# `tests/integration/*/` and `tests/e2e/` need the same containers. The
|
||||
# fixtures are session-scoped but lazy, so unit runs still need no Docker.
|
||||
pytest_plugins = ["tests.support.containers"]
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _reset_structlog_after_test() -> Iterator[None]:
|
||||
|
||||
Reference in New Issue
Block a user