Skip to content

Commit 2f5f894

Browse files
docs: update CLAUDE.md with E2E test documentation
- Add E2E test command (uv run pytest tests/e2e) - Document test_e2e schema isolation approach - Clarify DATABASE_URL requirement for E2E tests - Update test infrastructure descriptions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 70a7880 commit 2f5f894

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

CLAUDE.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ uv run alembic upgrade head
129129
### Testing
130130

131131
```bash
132-
# Run all tests (unit + integration)
132+
# Run all tests (unit + integration + e2e)
133133
uv run pytest
134134

135135
# Run only unit tests
@@ -138,6 +138,9 @@ uv run pytest tests/unit
138138
# Run only integration tests (uses SQLite in-memory)
139139
uv run pytest tests/integration
140140

141+
# Run only E2E tests (requires DATABASE_URL)
142+
uv run pytest tests/e2e
143+
141144
# Run with coverage
142145
uv run pytest --cov=. --cov-report=html
143146

@@ -149,11 +152,14 @@ uv run pytest tests/unit/api/test_routers.py::test_get_specs
149152
```
150153

151154
**Test Infrastructure**:
152-
- **Unit tests** (`tests/unit/`): Fast, mocked dependencies, run in CI
153-
- **Integration tests** (`tests/integration/`): Real database operations with SQLite, run in CI
154-
- **E2E tests** (`tests/e2e/`): Full stack with FastAPI TestClient, not yet in CI
155-
156-
**Database for Tests**: Integration tests use SQLite in-memory (via custom types in `core/database/types.py`). Production uses PostgreSQL native types (ARRAY, JSONB, UUID), tests use compatible fallbacks (JSON, String).
155+
- **Unit tests** (`tests/unit/`): Fast, mocked dependencies
156+
- **Integration tests** (`tests/integration/`): SQLite in-memory for API tests
157+
- **E2E tests** (`tests/e2e/`): Real PostgreSQL with isolated `test_e2e` schema
158+
159+
**Database for Tests**:
160+
- **Unit/Integration**: SQLite in-memory (via custom types in `core/database/types.py`)
161+
- **E2E**: PostgreSQL with `test_e2e` schema (auto-created, auto-dropped)
162+
- E2E tests are skipped if `DATABASE_URL` is not set
157163

158164
### Code Quality
159165

0 commit comments

Comments
 (0)