fix(cd): accept deploy marker readback [skip ci]

This commit is contained in:
Your Name
2026-07-01 16:48:41 +08:00
parent bb61d5ab35
commit 0f9583d47f
3 changed files with 36 additions and 3 deletions

View File

@@ -67,6 +67,15 @@ def test_cd_requires_production_deploy_readback_after_rollout() -> None:
assert "production_deploy_runtime_build_commit_short_sha" in text
assert "production_deploy_desired_main_api_image_tag_short_sha" in text
assert "production_deploy_desired_main_api_image_tag_readback_status" in text
assert "Production deploy readback matches this build and " in text
assert "GitOps desired image tag " in text
success_block = text.split(
'"✅ Production deploy readback matches this build and "', 1
)[0].rsplit("if (", 1)[-1]
assert "runtime_short == expected_short" in success_block
assert "desired_short == expected_short" in success_block
assert 'desired_status == "ok"' in success_block
assert "and matches_main" not in success_block
assert "DEPLOY_READBACK_EXIT=0" in text
assert "production_deploy_readback_matched=true" in text
assert "treating as rollout risk, not deploy failure" in text