Luca Sacchi Ricciardi
d274970358
test(public-api): T40 add comprehensive public API endpoint tests
...
- Schema tests: 25 tests (100% coverage)
- Rate limit tests: 18 tests (98% coverage)
- Endpoint tests: 27 tests for stats/usage/keys
- Security tests: JWT rejection, inactive tokens, missing auth
- Total: 70 tests for public API v1
2026-04-07 16:16:18 +02:00
Luca Sacchi Ricciardi
abf7e7a532
feat(api-keys): T24-T27 implement API keys CRUD endpoints
...
- T24: POST /api/keys with encryption and limit validation
- T25: GET /api/keys with pagination and sorting
- T26: PUT /api/keys/{id} for partial updates
- T27: DELETE /api/keys/{id} with cascade
- Add ownership verification (403 for unauthorized access)
- API key encryption with AES-256 before storage
- Never expose API key value in responses
- 100% coverage on api_keys router (25 tests)
Refs: T24 T25 T26 T27
2026-04-07 14:41:53 +02:00
Luca Sacchi Ricciardi
28fde3627e
feat(setup): T05 configure pytest with coverage
...
- Create pytest.ini with:
- Test discovery configuration (testpaths, python_files)
- Asyncio mode settings
- Coverage configuration (>=90% requirement)
- Custom markers (unit, integration, e2e, slow)
- Update conftest.py with:
- pytest_asyncio plugin
- Shared fixtures (project_root, src_path, temp_dir, mock_env_vars)
- Path configuration for imports
- Add test_pytest_config.py with 12 unit tests
- All tests passing (12/12)
Refs: T05
Completes setup phase T01-T05
2026-04-07 09:55:12 +02:00
Luca Sacchi Ricciardi
75f40acb17
feat(setup): T01 create project directory structure
...
- Create src/openrouter_monitor/ package structure
- Create models/, routers/, services/, utils/ subpackages
- Create tests/unit/ and tests/integration/ structure
- Create alembic/, docs/, scripts/ directories
- Add test_project_structure.py with 13 unit tests
- All tests passing (13/13)
Refs: T01
2026-04-07 09:44:41 +02:00