From: John Mulligan Date: Thu, 28 Sep 2023 21:00:47 +0000 (-0400) Subject: cephadm: import types from the modules that defines them X-Git-Tag: v19.0.0~177^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=602564d784ea33a729dc67002ac6cbaf706e0d4d;p=ceph.git cephadm: import types from the modules that defines them For the test fixtures created for Podman and Docker, import the Podman and Docker types from the module that defines them, rather than the cephadm.py file which now imports them. Signed-off-by: John Mulligan --- diff --git a/src/cephadm/tests/fixtures.py b/src/cephadm/tests/fixtures.py index ebed7b3d21ca..788913ae6b8e 100644 --- a/src/cephadm/tests/fixtures.py +++ b/src/cephadm/tests/fixtures.py @@ -17,15 +17,17 @@ def import_cephadm(): def mock_docker(): - _cephadm = import_cephadm() - docker = mock.Mock(_cephadm.Docker) + from cephadmlib.container_engines import Docker + + docker = mock.Mock(Docker) docker.path = '/usr/bin/docker' return docker def mock_podman(): - _cephadm = import_cephadm() - podman = mock.Mock(_cephadm.Podman) + from cephadmlib.container_engines import Podman + + podman = mock.Mock(Podman) podman.path = '/usr/bin/podman' podman.version = (2, 1, 0) return podman