fix migration resume and release workflow

This commit is contained in:
2026-07-16 12:31:59 +03:00
parent 45ce585aba
commit 8f0d123ff8
32 changed files with 2046 additions and 163 deletions

View File

@@ -568,6 +568,27 @@ class TestTaskManagerInput:
finally:
_cleanup_manager(mgr)
@pytest.mark.asyncio
async def test_immediate_password_resume_is_not_lost_before_wait(self):
"""@TEST_EDGE Resume arriving immediately after the input prompt must unblock migration."""
mgr, _, _, _ = _make_manager()
try:
from src.core.task_manager.models import Task, TaskStatus
task = Task(plugin_id="p1", params={})
task.status = TaskStatus.RUNNING
mgr.tasks[task.id] = task
mgr._add_log = AsyncMock()
await mgr.await_input(task.id, {"type": "database_password"})
await mgr.resume_task_with_password(task.id, {"db1": "secret"})
await asyncio.wait_for(mgr.wait_for_input(task.id), timeout=0.1)
assert task.status == TaskStatus.RUNNING
assert task.id not in mgr.graph.task_futures
finally:
_cleanup_manager(mgr)
@pytest.mark.asyncio
async def test_await_input_not_running_raises(self):
mgr, _, _, _ = _make_manager()