Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
366 changes: 0 additions & 366 deletions backend/tests/ship/test_build_durable.py

This file was deleted.

21 changes: 21 additions & 0 deletions backend/tests/ship/test_build_plan_phase.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,3 +603,24 @@ async def bailed():
monkeypatch.setattr(Ship, "implement", bailed)
with pytest.raises(FatalError, match="pure function"):
await flow.implement()


async def test_a_rejected_merge_intent_reparks_the_work_gate(monkeypatch):
"""GitHub declining the merge sends the operator back to the work gate,
rather than finishing a run whose PR never merged."""
flow = Build()
flow._policy = RepoPolicy()
reparked = []

async def declined():
return False

async def fake_work_gate():
reparked.append(True)
return True

monkeypatch.setattr(flow, "declare_merge_intent", declined)
monkeypatch.setattr(flow, "_work_gate", fake_work_gate)

assert await flow._approved_work() is True
assert reparked == [True]