From: Sage Weil Date: Sat, 18 Jan 2020 18:54:06 +0000 (-0600) Subject: Merge PR #32385 into master X-Git-Tag: v15.1.0~182 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=6818496448f73339040d167054b8504f1ca69852;p=ceph-ci.git Merge PR #32385 into master * refs/pull/32385/head: mgr/cephadm: check-host on 'host add' Reviewed-by: Sebastian Wagner --- 6818496448f73339040d167054b8504f1ca69852 diff --cc src/pybind/mgr/cephadm/tests/test_cephadm.py index e91abf28bc8,5d45cef90ca..d9630fb7672 --- a/src/pybind/mgr/cephadm/tests/test_cephadm.py +++ b/src/pybind/mgr/cephadm/tests/test_cephadm.py @@@ -49,11 -73,13 +49,13 @@@ class TestCephadm(object) assert new_mon.startswith('mon.') assert new_mon != 'mon.a' - def test_host(self, cephadm_module): + @mock.patch("cephadm.module.CephadmOrchestrator._get_connection") + @mock.patch("cephadm.module.CephadmOrchestrator._run_cephadm", _run_cephadm('[]')) + def test_host(self, _get_connection, cephadm_module): with self._with_host(cephadm_module, 'test'): - assert self._wait(cephadm_module, cephadm_module.get_hosts()) == [InventoryNode('test')] + assert wait(cephadm_module, cephadm_module.get_hosts()) == [InventoryNode('test')] c = cephadm_module.get_hosts() - assert self._wait(cephadm_module, c) == [] + assert wait(cephadm_module, c) == [] @mock.patch("cephadm.module.CephadmOrchestrator._run_cephadm", _run_cephadm('[]')) def test_service_ls(self, cephadm_module):