Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 1 KB

File metadata and controls

25 lines (18 loc) · 1 KB

OpenContext test layout

Tests are grouped by intent (not only by component):

Directory Role
tests/unit/ Isolated logic; mocks for I/O
tests/integration/ Hermetic cross-boundary flows (HTTP ↔ MCP ↔ plugins, Lambda adapter, CLI smoke server, Terraform contract checks)
tests/security/ SSRF, SQL/SoQL injection guards
tests/smoke/ Minimal CLI/protocol smoke checks

Pytest markers (pyproject.toml): unit, integration, security, smoke.

Hermetic integration tests use the in-repo plugin custom_plugins/integration_test_fake/ (always disabled in real configs; enabled only via test fixtures / OPENCONTEXT_CONFIG JSON).

Examples (always via uv):

uv run pytest tests/
uv run pytest tests/integration -m integration
uv run pytest tests/unit -m unit
uv run pytest tests/security -m security

Shared stubs/fixtures: conftest.py.