From: Michael Fritch Date: Sun, 15 Mar 2020 17:08:23 +0000 (-0600) Subject: mgr/cephadm: add nfs apply test X-Git-Tag: v15.2.1~19^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=080bb957c5708c3637c90eef41a0feb0668fd5ce;p=ceph.git mgr/cephadm: add nfs apply test Signed-off-by: Michael Fritch (cherry picked from commit 78ce6d431806c1f3e8e55e946eff64d450821db1) --- diff --git a/src/pybind/mgr/cephadm/tests/test_cephadm.py b/src/pybind/mgr/cephadm/tests/test_cephadm.py index bd6f520267ce..3e2461c2079a 100644 --- a/src/pybind/mgr/cephadm/tests/test_cephadm.py +++ b/src/pybind/mgr/cephadm/tests/test_cephadm.py @@ -347,6 +347,15 @@ class TestCephadm(object): assert wait(cephadm_module, c) == 'Scheduled rbd-mirror update...' assert wait(cephadm_module, cephadm_module.list_specs()) == [spec] + @mock.patch("cephadm.module.CephadmOrchestrator._run_cephadm", _run_cephadm('{}')) + def test_apply_nfs_save(self, cephadm_module): + with self._with_host(cephadm_module, 'test'): + ps = PlacementSpec(hosts=['test'], count=1) + spec = NFSServiceSpec('name', pool='pool', namespace='namespace', placement=ps) + c = cephadm_module.apply_nfs(spec) + assert wait(cephadm_module, c) == 'Scheduled nfs update...' + assert wait(cephadm_module, cephadm_module.list_specs()) == [spec] + @mock.patch("cephadm.module.CephadmOrchestrator._run_cephadm", _run_cephadm('{}')) def test_apply_prometheus_save(self, cephadm_module): with self._with_host(cephadm_module, 'test'):