After ORCH-10 the webhook resolves Plane state UUIDs per-project via get_project_states(project_id). The m6/plane webhook tests hardcoded the enduro in_progress UUID for ORCH-project payloads, so the pipeline never started and task creation assertions failed. Tests: - Mock get_project_states with a deterministic per-project ET/ORCH map (no network) and reset _STATES_CACHE via reload_project_states() per test. - Send each request with the in_progress UUID that matches its own project. CI hole: - requirements.txt lacked pytest-asyncio, so the 6 @pytest.mark.asyncio tests in test_orch10_states.py were SILENTLY SKIPPED -> CI green while async paths never ran. Add pytest-asyncio + pytest.ini (asyncio_mode=auto, strict markers); harden ci.yml (set -euo pipefail, --strict-markers) so any failure or unknown marker reds the build and the whole suite runs. src/ unchanged (per-project resolving is the ORCH-10 feature, kept as-is).
14 lines
516 B
INI
14 lines
516 B
INI
[pytest]
|
|
# ORCH-39: make the async webhook/state tests (test_orch10_states.py) actually
|
|
# run in every environment. Without pytest-asyncio + asyncio_mode=auto these
|
|
# @pytest.mark.asyncio tests were silently SKIPPED, so a broken async path
|
|
# could pass CI. asyncio_mode=auto runs `async def test_*` natively.
|
|
asyncio_mode = auto
|
|
|
|
# Fail loudly on unknown markers so a typo'd @pytest.mark.* can't silently
|
|
# disable a test.
|
|
markers =
|
|
asyncio: mark a coroutine test to be run by pytest-asyncio.
|
|
|
|
testpaths = tests
|