From 0bbca39c09137bdfe699795e894a81076bed046c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Je=C5=99=C3=A1bek=20=28Jiri=20Jerabek=29?= Date: Tue, 6 Aug 2024 13:50:45 +0200 Subject: [PATCH] Use `container_registry` config for podman login and push (#2213) use container_registry for podman login and push No-Issue --- .../tests/integration/api/test_container_signing.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/galaxy_ng/tests/integration/api/test_container_signing.py b/galaxy_ng/tests/integration/api/test_container_signing.py index 24d3c4616a..744bc6dbfd 100644 --- a/galaxy_ng/tests/integration/api/test_container_signing.py +++ b/galaxy_ng/tests/integration/api/test_container_signing.py @@ -27,24 +27,21 @@ def test_gw_push_and_sign_a_container(ansible_config, flags, galaxy_client): pytest.skip("GALAXY_CONTAINER_SIGNING_SERVICE is not configured") config = ansible_config("admin") - url = config['url'] - parsed_url = urlparse(url) - cont_reg = parsed_url.netloc - container_engine = config["container_engine"] + container_registry = config["container_registry"] # Pull alpine image - pull_and_tag_test_image(container_engine, cont_reg) + pull_and_tag_test_image(container_engine, container_registry) # Login to local registry with tls verify disabled cmd = [container_engine, "login", "-u", f"{config['username']}", "-p", - f"{config['password']}", f"{config['url'].split(parsed_url.path)[0]}"] + f"{config['password']}", container_registry] if container_engine == 'podman': cmd.append("--tls-verify=false") subprocess.check_call(cmd) # Push image to local registry - cmd = [container_engine, "push", f"{cont_reg}/alpine:latest"] + cmd = [container_engine, "push", f"{container_registry}/alpine:latest"] if container_engine == 'podman': cmd.append("--tls-verify=false") subprocess.check_call(cmd)