fix(api): support runtime template copy receipt
All checks were successful
CD Pipeline / workflow-shape (push) Successful in 1s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 22s
CD Pipeline / build-and-deploy (push) Successful in 6m53s
CD Pipeline / post-deploy-checks (push) Successful in 59s
All checks were successful
CD Pipeline / workflow-shape (push) Successful in 1s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 22s
CD Pipeline / build-and-deploy (push) Successful in 6m53s
CD Pipeline / post-deploy-checks (push) Successful in 59s
This commit is contained in:
@@ -45,6 +45,12 @@ _SNAPSHOT_PATH = (
|
||||
/ "operations"
|
||||
/ "p0-cicd-baseline-source-readiness.snapshot.json"
|
||||
)
|
||||
_RECEIPT_SNAPSHOT_PATH = (
|
||||
_REPO_ROOT
|
||||
/ "docs"
|
||||
/ "operations"
|
||||
/ "awoooi-gitea-onboarding-warning-step-template-copy-receipt.snapshot.json"
|
||||
)
|
||||
_WARNING_STEP_TEMPLATE_PATH = (
|
||||
_REPO_ROOT
|
||||
/ "docs"
|
||||
@@ -286,6 +292,7 @@ def test_template_copy_receipt_loader_confirms_template_copy():
|
||||
|
||||
_assert_template_copy_receipt(payload)
|
||||
assert payload["rollups"]["runtime_image_workflow_file_present"] is True
|
||||
assert payload["rollups"]["workflow_file_visible_in_runtime_image"] is True
|
||||
|
||||
|
||||
def test_template_copy_receipt_endpoint_returns_controlled_receipt():
|
||||
@@ -315,6 +322,11 @@ def test_template_copy_receipt_supports_runtime_image_layout(tmp_path):
|
||||
_WARNING_STEP_TEMPLATE_PATH.read_text(encoding="utf-8"),
|
||||
encoding="utf-8",
|
||||
)
|
||||
receipt_path = tmp_path / "docs" / "operations" / _RECEIPT_SNAPSHOT_PATH.name
|
||||
receipt_path.write_text(
|
||||
_RECEIPT_SNAPSHOT_PATH.read_text(encoding="utf-8"),
|
||||
encoding="utf-8",
|
||||
)
|
||||
|
||||
payload = load_latest_awoooi_gitea_onboarding_warning_step_template_copy_receipt(
|
||||
tmp_path
|
||||
@@ -325,7 +337,12 @@ def test_template_copy_receipt_supports_runtime_image_layout(tmp_path):
|
||||
"packaged_template_digest_fallback"
|
||||
)
|
||||
assert payload["rollups"]["runtime_image_workflow_file_present"] is False
|
||||
assert payload["rollups"]["workflow_file_visible_in_runtime_image"] is False
|
||||
assert payload["operation_boundaries"]["runtime_image_workflow_file_present"] is False
|
||||
assert (
|
||||
payload["operation_boundaries"]["active_workflow_file_visible_in_runtime_image"]
|
||||
is False
|
||||
)
|
||||
|
||||
|
||||
def _assert_template_copy_receipt(payload: dict):
|
||||
@@ -340,7 +357,9 @@ def _assert_template_copy_receipt(payload: dict):
|
||||
assert payload["readback"]["workflow_content_sha256_12"] == "70ecac9e4b59"
|
||||
assert payload["target_selector"]["active_workflow_file_created"] is True
|
||||
assert payload["rollups"]["template_file_present"] is True
|
||||
assert payload["rollups"]["receipt_snapshot_present"] is True
|
||||
assert payload["rollups"]["workflow_file_present"] is True
|
||||
assert payload["rollups"]["workflow_matches_template"] is True
|
||||
assert payload["rollups"]["auto_branch_event_count"] == 0
|
||||
assert payload["rollups"]["generic_runner_label_count"] == 0
|
||||
assert payload["rollups"]["expected_workflow_sha256_12"] == "70ecac9e4b59"
|
||||
|
||||
Reference in New Issue
Block a user