fix(agent): resolve ModuleNotFoundError for backend, add E2E test infra
- Dockerfile.agent: fix CMD (python -m src.agent.run), use backend/requirements.txt, minimal COPY (only src.agent + src.core.cot_logger), add GRACE contract - docker-compose.yml: SERVICE_TOKEN_SECRET -> SERVICE_JWT (match code) - docker-compose.enterprise-clean.yml: same env var fix - docker/.env.agent.example: same env var fix - build.sh: same env var fix - chore: semantics-testing SKILL.md, backend tests, pyproject.toml
This commit is contained in:
@@ -104,16 +104,28 @@ class TestDashboardMigration:
|
||||
|
||||
### Running tests
|
||||
```bash
|
||||
# All backend tests
|
||||
# All backend tests (integration tests skipped by default)
|
||||
cd backend && source .venv/bin/activate && python -m pytest -v
|
||||
|
||||
# Specific test file
|
||||
python -m pytest tests/test_migration.py -v
|
||||
|
||||
# Include integration tests (PostgreSQL/Superset Testcontainers)
|
||||
python -m pytest --run-integration
|
||||
|
||||
# Run only integration tests
|
||||
python -m pytest tests/integration/ --run-integration
|
||||
|
||||
# With coverage
|
||||
python -m pytest --cov=src --cov-report=term-missing
|
||||
```
|
||||
|
||||
**Integration tests** (`tests/integration/`) use Testcontainers (PostgreSQL 16, Superset 4.1.2)
|
||||
and require Docker. They are **skipped by default** — pass `--run-integration` to enable.
|
||||
The `--run-integration` flag is registered in `backend/tests/conftest.py` via `pytest_addoption`;
|
||||
skip logic lives in `backend/tests/integration/conftest.py` via `pytest_collection_modifyitems`.
|
||||
See also: `backend/pyproject.toml` `[tool.pytest.ini_options] markers` for the registered marker.
|
||||
|
||||
## VII. SVELTE / VITEST CONVENTIONS
|
||||
|
||||
### Test file structure
|
||||
|
||||
Reference in New Issue
Block a user