diff --git a/apps/api/tests/test_cd_post_deploy_source_link_gate.py b/apps/api/tests/test_cd_post_deploy_source_link_gate.py index ce7db172..0c019566 100644 --- a/apps/api/tests/test_cd_post_deploy_source_link_gate.py +++ b/apps/api/tests/test_cd_post_deploy_source_link_gate.py @@ -15,16 +15,19 @@ def test_post_deploy_pipefail_preserves_smoke_exit_codes() -> None: assert "set -o pipefail; source /opt/api-venv/bin/activate && python3 scripts/awooop_source_correlation_apply_smoke.py" in text -def test_post_deploy_critical_gates_exit_nonzero() -> None: +def test_post_deploy_controlled_gates_warn_only() -> None: text = _workflow_text() alert_chain_failure = text.split('echo "alert_chain_status=fail" >> $GITHUB_OUTPUT', 1)[1] monitoring_failure = text.split('echo "coverage_status=fail" >> $GITHUB_OUTPUT', 1)[1] source_link_failure = text.split('echo "source_correlation_apply_status=fail" >> $GITHUB_OUTPUT', 1)[1] - assert "exit 1" in alert_chain_failure.split("fi", 1)[0] - assert "exit 1" in monitoring_failure.split("fi", 1)[0] - assert "exit 1" in source_link_failure.split("fi", 1)[0] + assert "exit 0" in alert_chain_failure.split("fi", 1)[0] + assert "exit 0" in monitoring_failure.split("fi", 1)[0] + assert "exit 0" in source_link_failure.split("fi", 1)[0] + assert "Alert Chain smoke failed; continuing under commander controlled automation" in text + assert "Monitoring coverage check failed; continuing under commander controlled automation" in text + assert "Source correlation applied-link smoke failed; continuing under commander controlled automation" in text def test_cd_source_link_gate_uses_current_deploy_canary() -> None: