From 099e816e1096fc6d03b52ea151eaf27f73ba70c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Lesage?= <tlesage@teklia.com> Date: Wed, 24 Apr 2024 17:12:42 +0200 Subject: [PATCH] Fix broken tests --- arkindex/ponos/api.py | 1 + arkindex/ponos/tests/test_api.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/arkindex/ponos/api.py b/arkindex/ponos/api.py index 9334dc0e82..e4b60bc1c1 100644 --- a/arkindex/ponos/api.py +++ b/arkindex/ponos/api.py @@ -224,6 +224,7 @@ class TaskRestart(ProcessACLMixin, CreateAPIView): detail="Task's state must be in a final state to be restarted." ) # TODO Check the original_task_id field directly once it is implemented + # https://gitlab.teklia.com/arkindex/frontend/-/issues/1383 _, *suffix = task.slug.rsplit("_old", 1) if suffix: diff --git a/arkindex/ponos/tests/test_api.py b/arkindex/ponos/tests/test_api.py index 986db55f01..fbf730f6ab 100644 --- a/arkindex/ponos/tests/test_api.py +++ b/arkindex/ponos/tests/test_api.py @@ -74,6 +74,7 @@ class TestAPI(FixtureAPITestCase): "slug": "initialisation", "state": "unscheduled", "parents": [], + "original_task_id": None, "logs": "Failed successfully", "full_log": "http://somewhere", "extra_files": {}, @@ -157,6 +158,7 @@ class TestAPI(FixtureAPITestCase): "slug": "initialisation", "state": "unscheduled", "parents": [], + "original_task_id": None, "logs": "Failed successfully", "full_log": "http://somewhere", "extra_files": {}, @@ -198,6 +200,7 @@ class TestAPI(FixtureAPITestCase): "slug": "initialisation", "state": "unscheduled", "parents": [], + "original_task_id": None, "logs": "Failed successfully", "full_log": "http://somewhere", "extra_files": {}, @@ -657,6 +660,7 @@ class TestAPI(FixtureAPITestCase): "full_log": "http://somewhere", "gpu": None, "logs": "Task has been restarted", + "original_task_id": str(self.task2.id), "parents": [str(self.task1.id)], "run": 0, "shm_size": None, @@ -721,6 +725,7 @@ class TestAPI(FixtureAPITestCase): "full_log": "http://somewhere", "gpu": None, "logs": "Task has been restarted", + "original_task_id": str(self.task2.id), "parents": [str(self.task1.id)], "run": 0, "shm_size": None, -- GitLab