fix(ci): align merge approval cleanup contract

This commit is contained in:
Carlos Florencio
2026-09-05 17:12:44 +01:00
parent 792fdf61c7
commit 545e29311c
2 changed files with 10 additions and 5 deletions
@@ -41,13 +41,18 @@ class RevokeReadyToMergeWorkflowContractTest(unittest.TestCase):
# @covers AC-CI-MERGE-APPROVAL-001.2
def test_reads_and_independently_cleans_active_merge_states(self) -> None:
self.assertIn("autoMergeRequest { id }", self.workflow)
self.assertIn("autoMergeRequest { enabledAt }", self.workflow)
self.assertNotIn("autoMergeRequest { id }", self.workflow)
self.assertIn("mergeQueueEntry { id }", self.workflow)
self.assertIn("disablePullRequestAutoMerge", self.workflow)
self.assertIn("dequeuePullRequest", self.workflow)
self.assertIn("pullRequestId: $id", self.workflow)
self.assertIn("input: { id: $id }", self.workflow)
self.assertIn("currentPullRequest.autoMergeRequest?.id", self.workflow)
self.assertIn(
"currentPullRequest.autoMergeRequest ? currentPullRequest.id : null",
self.workflow,
)
self.assertNotIn("currentPullRequest.autoMergeRequest?.id", self.workflow)
self.assertIn("currentPullRequest.mergeQueueEntry?.id", self.workflow)
self.assertIn("attemptCleanup(\n 'auto-merge',", self.workflow)
self.assertIn("attemptCleanup(\n 'merge queue',", self.workflow)
@@ -73,7 +78,7 @@ class RevokeReadyToMergeWorkflowContractTest(unittest.TestCase):
queue_mutation = self.workflow.index("dequeuePullRequest")
queue_block = self.workflow[queue_mutation - 200 : queue_mutation + 300]
self.assertIn("{ id: currentPullRequest.id }", queue_block)
self.assertIn("{ id }", queue_block)
# @covers AC-CI-MERGE-APPROVAL-001.3
def test_event_label_snapshot_gates_all_cleanup(self) -> None: