diff --git a/galaxy_ng/tests/functional/cli/test_container_repository_tags.py b/galaxy_ng/tests/functional/cli/test_container_repository_tags.py index 4fd670c015..80c58f6e48 100644 --- a/galaxy_ng/tests/functional/cli/test_container_repository_tags.py +++ b/galaxy_ng/tests/functional/cli/test_container_repository_tags.py @@ -10,27 +10,17 @@ class ContainerRepositoryTagsTestCase(TestCaseUsingBindings): """Test whether a container repository's tags can be listed.""" @staticmethod - def login_to_registry( - container_engine="podman", - user="admin", - password="admin", - registry="localhost:5001" - ): + def login_to_registry(container_engine, registry): cmd = [ container_engine, - "login", "-u", user, "-p", password, + "login", "-u", "admin", "-p", "admin", "--tls-verify=false", registry ] run(cmd) @staticmethod - def create_container_repository( - image, - registry, - container_engine="podman", - tag="latest", - ): + def create_container_repository(container_engine, registry, image, tag): pull_registry = "registry.access.redhat.com" # Pull images, record image id for cleanup @@ -53,23 +43,30 @@ def create_container_repository( return image_id def test_list_container_repository_tags(self): - self.login_to_registry() + registry = f"{self.cfg.get_base_url().lstrip('http://')}" + container_engine = "podman" + + self.login_to_registry(container_engine, registry) image_ids = [] image = "ubi8" tags = ["8.1", "8.2"] for tag in tags: image_id = self.create_container_repository( + container_engine=container_engine, image=image, - registry="localhost:5001", + registry=registry, tag=tag) image_ids.append(image_id) - response = self.container_repo_tags_api.list(base_path=image) + # response = self.container_repo_tags_api.list(base_path=image) works in dev env + response = self.smash_client.get( + f"{self.galaxy_api_prefix}/_ui/v1/execution-environments/repositories/{image}/_content/tags/" + ) - self.assertEqual(response.meta.count, len(tags)) - for entry in response.data: - self.assertIn(entry.name, tags) + self.assertEqual(response["meta"]["count"], len(tags)) + for entry in response["data"]: + self.assertIn(entry["name"], tags) # Delete downloaded images for image_id in image_ids: