From f12fa72ade0b5012ba0aa729a81c676daca72bd3 Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 15 Feb 2024 12:49:04 +0100 Subject: [PATCH] fix more tests No-Issue --- .../tests/integration/api/test_container_delete.py | 12 ++++++++++-- galaxy_ng/tests/integration/conftest.py | 2 -- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/galaxy_ng/tests/integration/api/test_container_delete.py b/galaxy_ng/tests/integration/api/test_container_delete.py index 50a26bc3f7..562d95edf5 100644 --- a/galaxy_ng/tests/integration/api/test_container_delete.py +++ b/galaxy_ng/tests/integration/api/test_container_delete.py @@ -5,7 +5,7 @@ from galaxykit.containers import get_container_distribution, delete_container from galaxykit.utils import wait_for_task, GalaxyClientError -from ..utils.iqe_utils import pull_and_tag_test_image +from ..utils.iqe_utils import pull_and_tag_test_image, fix_prefix_workaround # this is to be enabled when https://github.com/ansible/galaxy_ng/pull/1627 @@ -43,6 +43,8 @@ def test_delete_ee_and_content(ansible_config, galaxy_client): assert distro_response["results"][0]["base_path"] == 'alpine' # Grab the repository href from the json and make get request + distro_response["results"][0]["repository"] = ( + fix_prefix_workaround(distro_response["results"][0]["repository"])) repo_response = gc.get(distro_response["results"][0]["repository"]) # Grab field from this Container Push Repo Instance @@ -61,11 +63,11 @@ def test_delete_ee_and_content(ansible_config, galaxy_client): # Ensure content list is empty by checking each content href content_hrefs = [item["pulp_href"] for item in content_list["results"]] - # FIXME: all items are found. Check it. for item in content_hrefs: failed = None try: + item = fix_prefix_workaround(item) gc.get(item) failed = False except GalaxyClientError as ge: @@ -115,6 +117,11 @@ def test_shared_content_is_not_deleted(ansible_config, galaxy_client): assert distro_response2["results"][0]["base_path"] == 'alpine2' # Grab the repository href from the json and make get request + distro_response1["results"][0]["repository"] = ( + fix_prefix_workaround(distro_response1["results"][0]["repository"])) + distro_response2["results"][0]["repository"] = ( + fix_prefix_workaround(distro_response2["results"][0]["repository"])) + repo_response_1 = gc.get(distro_response1["results"][0]["repository"]) repo_response_2 = gc.get(distro_response2["results"][0]["repository"]) @@ -142,6 +149,7 @@ def test_shared_content_is_not_deleted(ansible_config, galaxy_client): for item in content_hrefs: success = None try: + item = fix_prefix_workaround(item) gc.get(item) success = True except GalaxyClientError as ge: diff --git a/galaxy_ng/tests/integration/conftest.py b/galaxy_ng/tests/integration/conftest.py index 95f78b7b59..564a158e75 100755 --- a/galaxy_ng/tests/integration/conftest.py +++ b/galaxy_ng/tests/integration/conftest.py @@ -33,8 +33,6 @@ ) from .utils.tools import generate_random_artifact_version -# from orionutils.generator import build_collection - MARKER_CONFIG = """ qa: Mark tests to run in the vortex job.