4e2edb1d93
- Add backend API for git repository CRUD (create, list, delete) - Support bare repository initialization and mirror cloning - Add cascade delete for repositories when project is deleted - Add frontend page for repository management per project - Update project page with link to repositories - Add repo_base_path to config - Quality gates: ruff, mypy, typecheck, lint, build all pass
1.3 KiB
1.3 KiB
ADDED Requirements
Requirement: Shared Test Fixtures
The system SHALL provide shared fixtures in conftest.py for common test needs.
Scenario: Database session fixture
- GIVEN an integration test
- WHEN using the
db_sessionfixture - THEN it SHALL provide an async SQLAlchemy session
- AND the session SHALL use transaction rollback for isolation
Scenario: Test client fixture
- GIVEN an API integration test
- WHEN using the
clientfixture - THEN it SHALL provide an authenticated TestClient instance
- AND the client SHALL have valid access and refresh tokens
Scenario: SQLite unit test database
- GIVEN a unit test
- WHEN the test uses the
db_enginefixture - THEN it SHALL provide an in-memory SQLite engine
- AND no PostgreSQL connection SHALL be required
Requirement: Transaction Isolation
The system SHALL ensure integration tests don't pollute the database.
Scenario: Rollback after test
- GIVEN an integration test creates data
- WHEN the test completes
- THEN all database changes SHALL be rolled back
- AND subsequent tests SHALL see a clean database state
Scenario: Parallel test safety
- GIVEN multiple integration tests run concurrently
- WHEN each test uses transaction isolation
- THEN tests SHALL not interfere with each other