]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: test_cephadm: always set cluster fsid
authorSebastian Wagner <sebastian.wagner@suse.com>
Fri, 31 Jan 2020 10:47:55 +0000 (11:47 +0100)
committerSage Weil <sage@redhat.com>
Fri, 31 Jan 2020 13:16:14 +0000 (07:16 -0600)
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
src/pybind/mgr/cephadm/tests/fixtures.py
src/pybind/mgr/cephadm/tests/test_cephadm.py

index 5b288d89566cbfa2f266241029e085849554bc10..0b22a23b1954fdc574127cee9b05238bdcb2957f 100644 (file)
@@ -49,6 +49,7 @@ def cephadm_module():
             'upgrade_state': None,
         }
         m.__init__('cephadm', 0, 0)
+        m._cluster_fsid = "fsid"
         yield m
 
 
index 61372d6efde6926f0c8a815894fd52be59935877..0b616929968f3e13570faa51bdb41fb72985d849 100644 (file)
@@ -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)