]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cephadm: TestCheckHost: also mock `check_time_sync`
authorSebastian Wagner <sewagner@redhat.com>
Fri, 24 Sep 2021 10:46:54 +0000 (12:46 +0200)
committerSebastian Wagner <sewagner@redhat.com>
Fri, 24 Sep 2021 10:47:04 +0000 (12:47 +0200)
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 <sewagner@redhat.com>
src/cephadm/tests/test_cephadm.py

index 43d8df6bc53185dd7efdbc90a5c01b34f4e1d77f..13803f6203c4c026deab8cdd7c7fe79135ff260b 100644 (file)
@@ -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