mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
test: unblock-resume tests need a claimed task (branch_name)
The lifecycle fix routes a never-claimed (no-branch) blocked task to pending on unblock; these two tests asserted in_progress on a no-branch task. Give them a branch so they exercise the claimed-task resume path they intend (no-branch -> pending is covered by new unit tests).
This commit is contained in:
@@ -875,6 +875,9 @@ async def test_unblock_restores_to_in_progress(
|
||||
task = await svc.create(_req(task_setup))
|
||||
task.status = TaskStatus.IN_PROGRESS
|
||||
task.assigned_to = task_setup["agent_id"]
|
||||
# A claimed, actively-worked task has a branch; with one, unblock resumes
|
||||
# in_progress (a never-claimed/no-branch task returns to pending instead).
|
||||
task.branch_name = "feature/backend/abc12345"
|
||||
await db_session.flush()
|
||||
await svc.soft_block(
|
||||
task.id,
|
||||
|
||||
@@ -1462,6 +1462,9 @@ async def test_unblock_with_restore_with_invalid_pre_block_state(
|
||||
task = await svc.create(_req(task_setup))
|
||||
task.status = TaskStatus.BLOCKED
|
||||
task.pre_block_state = "garbage"
|
||||
# Has a branch (was claimed before blocking) so legacy unblock resumes
|
||||
# in_progress rather than returning a never-claimed task to pending.
|
||||
task.branch_name = "feature/backend/abc12345"
|
||||
await db_session.flush()
|
||||
out = await svc.unblock_with_restore(
|
||||
pm_agent_id=task_setup["agent_id"], task_id=task.id, restore=True
|
||||
|
||||
Reference in New Issue
Block a user