]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/cephadm: add a test for enabling cephfs mirroring module
authorJohn Mulligan <jmulligan@redhat.com>
Tue, 18 Jan 2022 18:31:03 +0000 (13:31 -0500)
committerJohn Mulligan <jmulligan@redhat.com>
Tue, 18 Jan 2022 18:34:25 +0000 (13:34 -0500)
Add a test that checks that when cephfs mirror service is enabled
the mirroring mgr module gets enabled.

Actually-written-by: Sebastian Wagner <sewagner@redhat.com>
Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/pybind/mgr/cephadm/tests/test_services.py

index d023369a2ee095340040cc3d73836446778120be..990472709bd6ad9eeddbd60ba3ea8dc297ee6922 100644 (file)
@@ -777,3 +777,15 @@ class TestIngressService:
                 }
 
                 assert haproxy_generated_conf[0] == haproxy_expected_conf
+
+
+class TestCephFsMirror:
+    @patch("cephadm.serve.CephadmServe._run_cephadm")
+    def test_config(self, _run_cephadm, cephadm_module: CephadmOrchestrator):
+        _run_cephadm.side_effect = async_side_effect(('{}', '', 0))
+        with with_host(cephadm_module, 'test'):
+            with with_service(cephadm_module, ServiceSpec('cephfs-mirror')):
+                cephadm_module.assert_issued_mon_command({
+                    'prefix': 'mgr module enable',
+                    'module': 'mirroring'
+                })