feat: add repair parts tracking
This commit is contained in:
1 parent
6e550c1c13
commit
eab9646960
23 files changed
+2386
-4
No files matched your search
@@ -219,7 +219,9 @@ class RepairTimelineRepositoryTests(unittest.TestCase):
|
||||
self.note_actor = uuid4()
|
||||
with self.repository._connection_scope(write=True) as connection:
|
||||
with connection.cursor() as cur:
|
||||
cur.execute("ALTER TABLE repair_events DISABLE TRIGGER trg_protect_repair_event_history")
|
||||
cur.execute("DELETE FROM repair_events")
|
||||
cur.execute("ALTER TABLE repair_events ENABLE TRIGGER trg_protect_repair_event_history")
|
||||
cur.execute("DELETE FROM repairs")
|
||||
cur.execute("DELETE FROM miner_tags")
|
||||
cur.execute("DELETE FROM miner_asset_id_history")
|
||||
@@ -611,7 +613,7 @@ class RepairTimelineRouterTests(unittest.TestCase):
|
||||
self.assertEqual(response.status_code, 403)
|
||||
self.assertFalse(self.service.begin_called)
|
||||
|
||||
def test_exactly_two_timeline_get_routes_are_registered(self):
|
||||
def test_timeline_and_parts_get_routes_are_registered(self):
|
||||
get_routes = {
|
||||
route.path
|
||||
for route in router.routes
|
||||
@@ -622,6 +624,7 @@ class RepairTimelineRouterTests(unittest.TestCase):
|
||||
{
|
||||
"/api/repairs/{repair_id}",
|
||||
"/api/repairs/{repair_id}/events",
|
||||
"/api/repairs/{repair_id}/parts",
|
||||
},
|
||||
)
|
||||
|
||||
@@ -715,6 +718,21 @@ class RepairTimelineArchitectureTests(unittest.TestCase):
|
||||
"minerops_repair_parts_summary_api",
|
||||
),
|
||||
("POST", "/api/repairs", "begin_repair"),
|
||||
(
|
||||
"GET",
|
||||
"/api/repairs/{repair_id}/parts",
|
||||
"list_repair_parts",
|
||||
),
|
||||
(
|
||||
"POST",
|
||||
"/api/repairs/{repair_id}/parts",
|
||||
"record_repair_part",
|
||||
),
|
||||
(
|
||||
"POST",
|
||||
"/api/repairs/{repair_id}/parts/{repair_part_id}/void",
|
||||
"void_repair_part",
|
||||
),
|
||||
(
|
||||
"POST",
|
||||
"/api/repairs/{repair_id}/complete",
|
||||
|
||||
Reference in new issue
Block a user