]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: add a test for enabling cephfs mirroring module 44661/head
authorJohn Mulligan <jmulligan@redhat.com>
Tue, 18 Jan 2022 18:31:03 +0000 (13:31 -0500)
committerAdam King <adking@redhat.com>
Thu, 17 Feb 2022 05:36:29 +0000 (00:36 -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>
(cherry picked from commit bcb4fa70f9f739dce3e1c111db0a322804350f9d)

Conflicts:
src/pybind/mgr/cephadm/tests/test_services.py

src/pybind/mgr/cephadm/tests/test_services.py

index efc91ac14fe5985d6baf3e8da77d3881f0ac70cf..a753cfd9fb9bf066cb7dfded5b18e4caf980722a 100644 (file)
@@ -788,3 +788,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.return_value = ('{}', '', 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'
+                })