test(ci): align post deploy gates with controlled automation
All checks were successful
CD Pipeline / tests (push) Successful in 1m53s
Code Review / ai-code-review (push) Successful in 23s
CD Pipeline / build-and-deploy (push) Successful in 5m43s
CD Pipeline / post-deploy-checks (push) Successful in 2m45s

This commit is contained in:
Your Name
2026-06-28 03:15:22 +08:00
parent 15b02cb6e0
commit 3a52813882

View File

@@ -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: