From 811403f98c555e8ec1dde65005194fae143d215d Mon Sep 17 00:00:00 2001 From: Christina Ying Wang Date: Mon, 13 May 2024 16:53:21 -0700 Subject: [PATCH 1/2] Fix typo in /v2/applications/:appId/restart-service Supervisor API call Change-type: patch Closes: #354 Signed-off-by: Christina Ying Wang --- balena/models/device.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/balena/models/device.py b/balena/models/device.py index 34a659c0..1efa66ca 100644 --- a/balena/models/device.py +++ b/balena/models/device.py @@ -1199,7 +1199,7 @@ def __restart_service(): app_id = device["belongs_to__application"][0]["id"] request( method="POST", - path=f"/supervisor/v2/applications/{app_id}/restart_service", + path=f"/supervisor/v2/applications/{app_id}/restart-service", settings=self.__settings, body={ "deviceId": device["id"], From 8678bc712c635cc44ab64114214b998824e38a34 Mon Sep 17 00:00:00 2001 From: Christina Ying Wang Date: Fri, 24 May 2024 12:42:22 -0700 Subject: [PATCH 2/2] Fix some typos in tests Signed-off-by: Christina Ying Wang --- tests/functional/models/test_environment_variables.py | 8 ++++---- tests/functional/test_logs.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/functional/models/test_environment_variables.py b/tests/functional/models/test_environment_variables.py index c118287b..146940df 100644 --- a/tests/functional/models/test_environment_variables.py +++ b/tests/functional/models/test_environment_variables.py @@ -26,7 +26,7 @@ def setUpClass(cls): def tearDownClass(cls): cls.helper.wipe_organization() - def test_01_get_emtpy_application_vars(self): + def test_01_get_empty_application_vars(self): for app_var in self.app_vars: self.assertIsNone(app_var.get(self.app["id"], "DOES_NOT_EXIST")) @@ -93,7 +93,7 @@ def setUpClass(cls): def tearDownClass(cls): cls.helper.wipe_organization() - def test_01_get_emtpy_device_env_var(self): + def test_01_get_empty_device_env_var(self): self.assertIsNone(self.device_env_var.get(self.device["id"], "DOES_NOT_EXIST")) with self.assertRaises(self.helper.balena_exceptions.DeviceNotFound): @@ -170,7 +170,7 @@ def setUpClass(cls): def tearDownClass(cls): cls.helper.wipe_organization() - def test_01_get_emtpy_device_service_env_var(self): + def test_01_get_empty_device_service_env_var(self): self.assertIsNone(self.device_service_env_var.get(self.device["id"], self.service["id"], "DOES_NOT_EXIST")) with self.assertRaises(self.helper.balena_exceptions.ServiceNotFound): @@ -288,7 +288,7 @@ def __get_param(self, app, service, name) -> Union[ServiceNaturalKey, int]: } return service[name] - def test_01_get_emtpy_service_var(self): + def test_01_get_empty_service_var(self): for fetch_resource in self.__service_fetch_resources: param = self.__get_param(self.app, self.service, fetch_resource) self.assertIsNone(self.service_var.get(param, "DOES_NOT_EXIST")) diff --git a/tests/functional/test_logs.py b/tests/functional/test_logs.py index dc2a523f..6d658a5b 100644 --- a/tests/functional/test_logs.py +++ b/tests/functional/test_logs.py @@ -135,7 +135,7 @@ def cb(data): self.balena.logs.unsubscribe(self.uuid) - def test_06_should_allow_to_unsubiscribe(self): + def test_06_should_allow_to_unsubscribe(self): results = [] def cb(data):