feat(v2): enqueue and lease durable executions
This commit is contained in:
@@ -84,6 +84,16 @@ async def test_local_source_probe_archive_and_repository_targeted_job(
|
||||
)
|
||||
assert job.status_code == 201
|
||||
assert "destination_path" not in job.json()
|
||||
execution = await client.post(
|
||||
f"/api/v2/jobs/{job.json()['id']}/executions", headers=headers
|
||||
)
|
||||
assert execution.status_code == 202
|
||||
assert execution.json()["state"] == "queued"
|
||||
duplicate = await client.post(
|
||||
f"/api/v2/jobs/{job.json()['id']}/executions", headers=headers
|
||||
)
|
||||
assert duplicate.status_code == 409
|
||||
assert duplicate.json()["code"] == "execution_active"
|
||||
archived = await client.delete(f"/api/v2/sources/{source_id}", headers=headers)
|
||||
assert archived.status_code == 204
|
||||
assert (
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from backup_tool.execution import ACTIVE_STATES, TERMINAL_STATES, TransitionError, transition
|
||||
from backup_tool.execution import (
|
||||
ACTIVE_STATES,
|
||||
TERMINAL_STATES,
|
||||
TransitionError,
|
||||
transition,
|
||||
)
|
||||
|
||||
|
||||
def test_transitions_are_monotonic_and_terminal_states_cannot_change() -> None:
|
||||
|
||||
Reference in New Issue
Block a user