From 8377901586e472321dcf22388a27c0cc532aad4f Mon Sep 17 00:00:00 2001 From: Thomas Sundvoll Date: Wed, 25 Oct 2023 15:17:08 +0200 Subject: [PATCH] Add missing parameter for /info/robot-settings endpoint --- src/isar/apis/schedule/scheduling_controller.py | 3 ++- tests/isar/apis/scheduler/test_scheduler_router.py | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/isar/apis/schedule/scheduling_controller.py b/src/isar/apis/schedule/scheduling_controller.py index b7105ef2..cafd6378 100644 --- a/src/isar/apis/schedule/scheduling_controller.py +++ b/src/isar/apis/schedule/scheduling_controller.py @@ -306,8 +306,9 @@ def get_info(self): robot_package=settings.ROBOT_PACKAGE, isar_id=settings.ISAR_ID, robot_name=settings.ROBOT_NAME, - robot_map_name=settings.DEFAULT_MAP, robot_capabilities=robot_settings.CAPABILITIES, + robot_map_name=settings.DEFAULT_MAP, + plant_short_name=settings.PLANT_SHORT_NAME, ) def _api_response(self, mission: Mission) -> StartMissionResponse: diff --git a/tests/isar/apis/scheduler/test_scheduler_router.py b/tests/isar/apis/scheduler/test_scheduler_router.py index dd48fa3a..343e40bc 100644 --- a/tests/isar/apis/scheduler/test_scheduler_router.py +++ b/tests/isar/apis/scheduler/test_scheduler_router.py @@ -363,3 +363,9 @@ def test_drive_to_timeout(self, client: TestClient): def test_state_machine_in_conflicting_state(self, client: TestClient): response = client.post(url=self.schedule_drive_to_path, data=self.mock_data) assert response.status_code == HTTPStatus.CONFLICT + + +class TestInfoRobotSettings: + def test_info_robot_settings(self, client: TestClient): + response = client.get(url="/info/robot-settings") + assert response.status_code == HTTPStatus.OK