From: Tatjana Dehler Date: Thu, 9 Jan 2020 12:41:43 +0000 (+0100) Subject: Merge pull request #32234 from votdev/better_orch_exception X-Git-Tag: v15.1.0~285 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1c18ca31fdddd1e03af7f463d76924fb058b64cb;p=ceph.git Merge pull request #32234 from votdev/better_orch_exception mgr/dashboard: Throw a more meaningful exception Reviewed-by: Sebastian Wagner Reviewed-by: Tatjana Dehler Reviewed-by: Tiago Melo --- 1c18ca31fdddd1e03af7f463d76924fb058b64cb diff --cc qa/tasks/mgr/dashboard/test_host.py index bc133d1e2d3a,2216a00bd020..5276d9056698 --- a/qa/tasks/mgr/dashboard/test_host.py +++ b/qa/tasks/mgr/dashboard/test_host.py @@@ -83,9 -83,19 +83,23 @@@ class HostControllerTest(DashboardTestC self.assertSchema(data, JList(JObj({ 'daemons': JList(str), 'devid': str, - 'location': JList(JObj({'host': str, 'dev': str})) + 'location': JList(JObj({ + 'host': str, + 'dev': str, + 'path': str + })) }))) + + + class HostControllerNoOrchestratorTest(DashboardTestCase): + def test_host_create(self): + self._post('/api/host?hostname=foo') + self.assertStatus(503) + self.assertError(code='orchestrator_status_unavailable', + component='orchestrator') + + def test_host_delete(self): + self._delete('/api/host/bar') + self.assertStatus(503) + self.assertError(code='orchestrator_status_unavailable', + component='orchestrator')