Skip to content

Commit

Permalink
More tests skip if ALLOW_LOCAL_RESOURCE_MANAGEMENT=False (#2282)
Browse files Browse the repository at this point in the history
* fix caps and skip if resource management false
* skip random_namespace if no allow local resources
No-Issue
  • Loading branch information
jerabekjiri authored Sep 30, 2024
1 parent cfa85ee commit ee901e5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
5 changes: 4 additions & 1 deletion galaxy_ng/tests/integration/api/test_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,12 @@
os.getenv("ENABLE_DAB_TESTS"),
reason="Group creation is disabled in the DAB test profile."
)
def test_gw_group_role_listing(galaxy_client, test_data):
def test_gw_group_role_listing(galaxy_client, settings, test_data):
"""Tests ability to list roles assigned to a namespace."""

if settings.get('ALLOW_LOCAL_RESOURCE_MANAGEMENT') is False:
pytest.skip("this test relies on local resource creation")

gc = galaxy_client("admin", ignore_cache=True)
# Create Group
group_name = str(uuid.uuid4())
Expand Down
6 changes: 5 additions & 1 deletion galaxy_ng/tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,12 @@ def autohubtest2(galaxy_client):


@pytest.fixture(scope="function")
def random_namespace(galaxy_client):
def random_namespace(galaxy_client, settings):
"""Make a randomized namespace."""

if settings.get('ALLOW_LOCAL_RESOURCE_MANAGEMENT') is False:
pytest.skip("this test relies on local resource creation")

gc = galaxy_client("admin")
ns_name = 'namespace_' + generate_namespace()
if len(ns_name) > 60:
Expand Down
4 changes: 2 additions & 2 deletions galaxy_ng/tests/integration/dab/test_dab_rbac.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def test_dab_rbac_repository_owner_by_user_or_team(
random_username
):

if settings.get('allow_local_resource_management') is False:
if settings.get('ALLOW_LOCAL_RESOURCE_MANAGEMENT') is False:
pytest.skip("this test relies on local resource creation")

gc = galaxy_client("admin", ignore_cache=True)
Expand Down Expand Up @@ -169,7 +169,7 @@ def test_dab_rbac_namespace_owner_by_user_or_team(
to view a private repository that includes their collection.
"""

if settings.get('allow_local_resource_management') is False:
if settings.get('ALLOW_LOCAL_RESOURCE_MANAGEMENT') is False:
pytest.skip("this test relies on local resource creation")

gc = galaxy_client("admin", ignore_cache=True)
Expand Down

0 comments on commit ee901e5

Please sign in to comment.