Add execution engine and task lifecycle services
This commit is contained in:
@@ -28,10 +28,28 @@ def test_post_tasks_creates_planned_task() -> None:
|
||||
payload = response.json()
|
||||
|
||||
assert response.status_code == 200
|
||||
assert payload["status"] == "planned"
|
||||
assert payload["status"] == "running"
|
||||
assert payload["progress"]["total"] == 2
|
||||
|
||||
|
||||
def test_cancel_endpoint_marks_task_cancelled() -> None:
|
||||
client = TestClient(app)
|
||||
|
||||
created = client.post(
|
||||
"/tasks",
|
||||
json={
|
||||
"project_id": "default",
|
||||
"goal": "Cancel me",
|
||||
"inputs": {},
|
||||
"execution_mode": "agent_graph",
|
||||
},
|
||||
).json()
|
||||
response = client.post(f"/tasks/{created['task_id']}/cancel", json={"reason": "stop"})
|
||||
|
||||
assert response.status_code == 200
|
||||
assert response.json()["status"] == "cancelled"
|
||||
|
||||
|
||||
def test_worker_registration_is_exposed_via_list_endpoint() -> None:
|
||||
client = TestClient(app)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user