]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
Merge PR #32385 into master
authorSage Weil <sage@redhat.com>
Sat, 18 Jan 2020 18:54:06 +0000 (12:54 -0600)
committerSage Weil <sage@redhat.com>
Sat, 18 Jan 2020 18:54:06 +0000 (12:54 -0600)
* refs/pull/32385/head:
mgr/cephadm: check-host on 'host add'

Reviewed-by: Sebastian Wagner <swagner@suse.com>
1  2 
src/pybind/mgr/cephadm/module.py
src/pybind/mgr/cephadm/tests/test_cephadm.py

Simple merge
index e91abf28bc808a413ec579ee4e9915b66bfbef2e,5d45cef90cabb08ebf8d78d801b39fa3f2453a15..d9630fb767250036d5830cf83748f06317711bd1
@@@ -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):