summaryrefslogtreecommitdiffstats
path: root/src/cephadm/tests/test_ingress.py
diff options
context:
space:
mode:
authorJohn Mulligan <jmulligan@redhat.com>2023-10-19 15:42:34 +0200
committerJohn Mulligan <jmulligan@redhat.com>2023-11-03 16:24:48 +0100
commit19378b11756e5d985421e1978bb2d59159bb3f21 (patch)
treea426e2dcb13a03b3b70b01982cc8f230941a5273 /src/cephadm/tests/test_ingress.py
parentMerge pull request #54081 from phlogistonjohn/jjm-cephadm-podman-props (diff)
downloadceph-19378b11756e5d985421e1978bb2d59159bb3f21.tar.xz
ceph-19378b11756e5d985421e1978bb2d59159bb3f21.zip
cephadm: move extract_uid_gid func to container_types module
While extract_uid_gid isn't a perfect fit for container_types it is a fairly fundamental function for working with containers in cephadm and doesn't require anything beyond types in containers_types and that module's existing imports. Moving extract_uid_gid should allow us to more easily move other functions in the future. Signed-off-by: John Mulligan <jmulligan@redhat.com>
Diffstat (limited to 'src/cephadm/tests/test_ingress.py')
-rw-r--r--src/cephadm/tests/test_ingress.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cephadm/tests/test_ingress.py b/src/cephadm/tests/test_ingress.py
index 08a9808ddbb..698305aa4f3 100644
--- a/src/cephadm/tests/test_ingress.py
+++ b/src/cephadm/tests/test_ingress.py
@@ -166,7 +166,7 @@ def test_haproxy_extract_uid_gid_haproxy():
good_haproxy_json(),
SAMPLE_HAPROXY_IMAGE,
)
- with mock.patch("cephadm.CephContainer") as cc:
+ with mock.patch("cephadmlib.container_types.CephContainer") as cc:
cc.return_value.run.return_value = "500 500"
uid, gid = hap.uid_gid(ctx)
cc.return_value.run.assert_called()
@@ -329,7 +329,7 @@ def test_keepalived_extract_uid_gid_keepalived():
good_keepalived_json(),
SAMPLE_KEEPALIVED_IMAGE,
)
- with mock.patch("cephadm.CephContainer") as cc:
+ with mock.patch("cephadmlib.container_types.CephContainer") as cc:
cc.return_value.run.return_value = "500 500"
uid, gid = kad.uid_gid(ctx)
cc.return_value.run.assert_called()