From: Sebastian Wagner Date: Fri, 24 Sep 2021 10:46:54 +0000 (+0200) Subject: cephadm: TestCheckHost: also mock `check_time_sync` X-Git-Tag: v16.2.7~67^2~57 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=23d69d060210d6cc957d49f17ba0f4ced9b97cef;p=ceph.git cephadm: TestCheckHost: also mock `check_time_sync` Fixes: https://tracker.ceph.com/issues/52722 ``` TestCheckHost.test_container_engine fails at cephadm:5834: Error cephadm.Error: No time synchronization is active ``` Signed-off-by: Sebastian Wagner (cherry picked from commit fc9d9b39144fd16f2b2a9621f80dcd1162459000) --- diff --git a/src/cephadm/tests/test_cephadm.py b/src/cephadm/tests/test_cephadm.py index 8a970266651..958797e17a7 100644 --- a/src/cephadm/tests/test_cephadm.py +++ b/src/cephadm/tests/test_cephadm.py @@ -1514,7 +1514,8 @@ if ! grep -qs /var/lib/ceph/9b9d7609-f4d5-4aba-94c8-effa764d96c9/iscsi.daemon_id class TestCheckHost: @mock.patch('cephadm.find_executable', return_value='foo') - def test_container_engine(self, find_executable): + @mock.patch('cephadm.check_time_sync', return_value=True) + def test_container_engine(self, find_executable, check_time_sync): ctx = cd.CephadmContext() ctx.container_engine = None