From: Sebastian Wagner Date: Fri, 31 Jan 2020 10:47:55 +0000 (+0100) Subject: mgr/cephadm: test_cephadm: always set cluster fsid X-Git-Tag: v15.1.1~568^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=614fcc34a734f4e95511b7b14774c5c729a2f729;p=ceph.git mgr/cephadm: test_cephadm: always set cluster fsid Signed-off-by: Sebastian Wagner --- diff --git a/src/pybind/mgr/cephadm/tests/fixtures.py b/src/pybind/mgr/cephadm/tests/fixtures.py index 5b288d89566c..0b22a23b1954 100644 --- a/src/pybind/mgr/cephadm/tests/fixtures.py +++ b/src/pybind/mgr/cephadm/tests/fixtures.py @@ -49,6 +49,7 @@ def cephadm_module(): 'upgrade_state': None, } m.__init__('cephadm', 0, 0) + m._cluster_fsid = "fsid" yield m diff --git a/src/pybind/mgr/cephadm/tests/test_cephadm.py b/src/pybind/mgr/cephadm/tests/test_cephadm.py index 61372d6efde6..0b616929968f 100644 --- a/src/pybind/mgr/cephadm/tests/test_cephadm.py +++ b/src/pybind/mgr/cephadm/tests/test_cephadm.py @@ -85,7 +85,6 @@ class TestCephadm(object): @mock.patch("cephadm.module.CephadmOrchestrator.mon_command", mon_command) @mock.patch("cephadm.module.CephadmOrchestrator._get_connection") def test_service_action(self, _send_command, _get_connection, cephadm_module): - cephadm_module._cluster_fsid = "fsid" cephadm_module.service_cache_timeout = 10 with self._with_host(cephadm_module, 'test'): c = cephadm_module.describe_service(refresh=True) @@ -143,7 +142,6 @@ class TestCephadm(object): ]) )) def test_remove_osds(self, cephadm_module): - cephadm_module._cluster_fsid = "fsid" with self._with_host(cephadm_module, 'test'): c = cephadm_module.describe_service(refresh=True) wait(cephadm_module, c) @@ -168,6 +166,7 @@ class TestCephadm(object): @mock.patch("cephadm.module.CephadmOrchestrator.mon_command", mon_command) @mock.patch("cephadm.module.CephadmOrchestrator._get_connection") def test_rgw(self, _send_command, _get_connection, cephadm_module): + with self._with_host(cephadm_module, 'test'): ps = PlacementSpec(hosts=['test'], count=1) c = cephadm_module.add_rgw(RGWSpec('realm', 'zone', placement=ps)) @@ -188,7 +187,6 @@ class TestCephadm(object): ]) )) def test_remove_rgw(self, cephadm_module): - cephadm_module._cluster_fsid = "fsid" with self._with_host(cephadm_module, 'test'): c = cephadm_module.describe_service(refresh=True) wait(cephadm_module, c)