From c90c01b91987eacbff2b920606b8b07d1e2fd5b1 Mon Sep 17 00:00:00 2001 From: stream Date: Mon, 8 Jun 2026 06:41:52 +0000 Subject: [PATCH] =?UTF-8?q?fix(tests):=20integ=20fixtures=20=E2=80=94=20to?= =?UTF-8?q?=5Fanalyse=20always=20present=20(066),=20full=20status=20keys,?= =?UTF-8?q?=20security=5Fgate=20registered=20(022)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_confirm_deploy_integration.py | 16 ++++++++++++++++ tests/test_plane_confirm_deploy.py | 10 ++++++++++ tests/test_plane_status_model.py | 1 + tests/test_reconciler_plane.py | 4 ++++ tests/test_stage_engine_phase_a_cta.py | 4 ++++ 5 files changed, 35 insertions(+) diff --git a/tests/test_confirm_deploy_integration.py b/tests/test_confirm_deploy_integration.py index 2405878..92f268b 100644 --- a/tests/test_confirm_deploy_integration.py +++ b/tests/test_confirm_deploy_integration.py @@ -38,12 +38,28 @@ CONFIRM = "44444444-4444-4444-4444-444444444444" # ORCH project: Confirm Deploy resolved. enduro-like project: NO confirm_deploy key. _STATES_SELF = { "in_progress": IN_PROGRESS, + "to_analyse": IN_PROGRESS, # ORCH-066 integ: always present (alias) + # ORCH-066 integ: full status-model keys alias to base UUIDs, + # mirroring get_project_states() _STATE_ALIAS_FALLBACK in production. + "analysis": IN_PROGRESS, + "code_review": APPROVED, + "awaiting_deploy": IN_PROGRESS, + "deploying": IN_PROGRESS, + "monitoring": APPROVED, "approved": APPROVED, "rejected": REJECTED, "confirm_deploy": CONFIRM, } _STATES_NONSELF = { "in_progress": IN_PROGRESS, + "to_analyse": IN_PROGRESS, # ORCH-066 integ: always present (alias) + # ORCH-066 integ: full status-model keys alias to base UUIDs, + # mirroring get_project_states() _STATE_ALIAS_FALLBACK in production. + "analysis": IN_PROGRESS, + "code_review": APPROVED, + "awaiting_deploy": IN_PROGRESS, + "deploying": IN_PROGRESS, + "monitoring": APPROVED, "approved": APPROVED, "rejected": REJECTED, } diff --git a/tests/test_plane_confirm_deploy.py b/tests/test_plane_confirm_deploy.py index 1b9d136..4bdc919 100644 --- a/tests/test_plane_confirm_deploy.py +++ b/tests/test_plane_confirm_deploy.py @@ -38,6 +38,16 @@ CONFIRM = "44444444-4444-4444-4444-444444444444" _STATES = { "in_progress": IN_PROGRESS, + # ORCH-066 integ: real get_project_states always exposes to_analyse + # (aliased to in_progress on projects without the dedicated status). + "to_analyse": IN_PROGRESS, + # ORCH-066 integ: full status-model keys alias to base UUIDs, + # mirroring get_project_states() _STATE_ALIAS_FALLBACK in production. + "analysis": IN_PROGRESS, + "code_review": APPROVED, + "awaiting_deploy": IN_PROGRESS, + "deploying": IN_PROGRESS, + "monitoring": APPROVED, "approved": APPROVED, "rejected": REJECTED, "confirm_deploy": CONFIRM, diff --git a/tests/test_plane_status_model.py b/tests/test_plane_status_model.py index a6bc81e..268dbf1 100644 --- a/tests/test_plane_status_model.py +++ b/tests/test_plane_status_model.py @@ -138,6 +138,7 @@ def test_tc23_qg_checks_registry_unchanged(): "check_ci_green", "check_review_approved", "check_tests_passed", "check_reviewer_verdict", "check_tests_local", "check_deploy_status", "check_staging_status", "check_branch_mergeable", "check_staging_image_fresh", + "check_security_gate", # ORCH-022 integ: security-gate registered } diff --git a/tests/test_reconciler_plane.py b/tests/test_reconciler_plane.py index de9cf33..51c96c7 100644 --- a/tests/test_reconciler_plane.py +++ b/tests/test_reconciler_plane.py @@ -364,6 +364,9 @@ def _patch_states_with_terminals(monkeypatch, *, alias_done_to_approved=False): done_uuid = _APPROVED if alias_done_to_approved else _DONE states = { "in_progress": _IN_PROGRESS, + # ORCH-066 integ: real get_project_states() always exposes to_analyse, + # aliased to in_progress on projects without the dedicated status. + "to_analyse": _IN_PROGRESS, "approved": _APPROVED, "rejected": _REJECTED, "done": done_uuid, @@ -653,6 +656,7 @@ def test_tc10_done_silent_on_all_projects(monkeypatch): states = { "in_progress": _IN_PROGRESS, + "to_analyse": _IN_PROGRESS, # ORCH-066 integ: always present "approved": _APPROVED, "rejected": _REJECTED, "done": _DONE, diff --git a/tests/test_stage_engine_phase_a_cta.py b/tests/test_stage_engine_phase_a_cta.py index a448458..b86c391 100644 --- a/tests/test_stage_engine_phase_a_cta.py +++ b/tests/test_stage_engine_phase_a_cta.py @@ -45,6 +45,10 @@ def fresh_db(monkeypatch, tmp_path): {**stage_engine.QG_CHECKS, "check_staging_status": _pass, "check_branch_mergeable": _pass, + # ORCH-022 integ: security-gate now runs on the deploy-staging->deploy + # edge; this 059 test exercises the CTA, not the scanner (022 has its + # own tests), so pass it like the other deploy sub-gates. + "check_security_gate": _pass, "check_staging_image_fresh": _pass}, ) yield