Skip to content

Commit

Permalink
Skip test load repositories in 2.3 to 2.4 upgrade (#2402)
Browse files Browse the repository at this point in the history
* custom repos not in 4.6
* allow remotes in 4.6
* fix linter
  • Loading branch information
jerabekjiri authored Jan 9, 2025
1 parent fe52f0b commit 018ed9e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 17 deletions.
8 changes: 6 additions & 2 deletions galaxy_ng/tests/integration/api/test_load_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,9 @@ def test_load_namespaces(self, galaxy_client, data):
add_group(gc, ns["name"], ns["group"],
object_roles=["galaxy.collection_namespace_owner"])

@pytest.mark.min_hub_version("4.6")
@pytest.mark.min_hub_version("4.7")
@pytest.mark.load_data
def test_load_repositories_and_remotes(self, galaxy_client, data):
def test_load_repositories(self, galaxy_client, data):
gc = galaxy_client("admin")

for repo in data["repositories"]:
Expand All @@ -179,6 +179,10 @@ def test_load_repositories_and_remotes(self, galaxy_client, data):
else:
raise e

@pytest.mark.min_hub_version("4.6")
@pytest.mark.load_data
def test_load_remotes(self, galaxy_client, data):
gc = galaxy_client("admin")
for remote in data["remotes"]:
try:
logger.debug(f"Creating remote {remote['name']}")
Expand Down
30 changes: 15 additions & 15 deletions galaxy_ng/tests/integration/api/test_verify_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,28 @@ def test_verify_data_groups(self, galaxy_client, settings, data):
@pytest.mark.min_hub_version("4.7dev")
@pytest.mark.skipif(is_upgrade_from_aap23_hub46(), reason=SKIP_MESSAGE_23)
@pytest.mark.verify_data
def test_verify_data_repos(self, galaxy_client, data):
def test_verify_data_repositories(self, galaxy_client, data):
"""
Test that verifies the data previously loaded by test_load_data
"""
gc = galaxy_client("admin")
for expected_repo in data["repositories"]:
get_repository_href(gc, expected_repo["name"])

@pytest.mark.min_hub_version("4.6dev")
@pytest.mark.verify_data
def test_verify_data_remotes(self, galaxy_client, data):
"""
Test that verifies the data previously loaded by test_load_data
"""
gc = galaxy_client("admin")
for remote in data["remotes"]:
actual_remote = view_remotes(gc, remote["name"])
assert actual_remote["results"][0]["url"] == remote["url"]
assert actual_remote["results"][0]["name"] == remote["name"]
assert actual_remote["results"][0]["signed_only"] == remote["signed_only"]
assert actual_remote["results"][0]["tls_validation"] == remote["tls_validation"]

@pytest.mark.min_hub_version("4.6dev")
@pytest.mark.verify_data
def test_verify_data_rbac_roles(self, galaxy_client, data):
Expand Down Expand Up @@ -192,17 +206,3 @@ def test_verify_data_remote_registries(self, galaxy_client, data):
f"?name={remote_registry['name']}")
assert actual_rr["data"][0]["name"] == remote_registry["name"]
assert actual_rr["data"][0]["url"] == remote_registry["url"]

@pytest.mark.min_hub_version("4.6dev")
@pytest.mark.verify_data
def test_verify_data_remotes(self, galaxy_client, data):
"""
Test that verifies the data previously loaded by test_load_data
"""
gc = galaxy_client("admin")
for remote in data["remotes"]:
actual_remote = view_remotes(gc, remote["name"])
assert actual_remote["results"][0]["url"] == remote["url"]
assert actual_remote["results"][0]["name"] == remote["name"]
assert actual_remote["results"][0]["signed_only"] == remote["signed_only"]
assert actual_remote["results"][0]["tls_validation"] == remote["tls_validation"]

0 comments on commit 018ed9e

Please sign in to comment.