From: Sebastian Wagner Date: Fri, 24 Sep 2021 10:46:54 +0000 (+0200) Subject: cephadm: TestCheckHost: also mock `check_time_sync` X-Git-Tag: v17.1.0~817^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fc9d9b39144fd16f2b2a9621f80dcd1162459000;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 --- diff --git a/src/cephadm/tests/test_cephadm.py b/src/cephadm/tests/test_cephadm.py index 43d8df6bc531..13803f6203c4 100644 --- a/src/cephadm/tests/test_cephadm.py +++ b/src/cephadm/tests/test_cephadm.py @@ -1534,7 +1534,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