Skip to content

Commit

Permalink
fix gw pipelines (#2144)
Browse files Browse the repository at this point in the history
No-Issue
  • Loading branch information
chr-stian authored May 16, 2024
1 parent 19bb297 commit 2a3d49d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
6 changes: 3 additions & 3 deletions galaxy_ng/tests/integration/api/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def test_gateway_auth_admin_gateway_sessionid(galaxy_client):
remove_from_cache("admin")
with pytest.raises(GalaxyClientError) as ctx:
gc.get("v3/plugin/ansible/content/published/collections/index/", relogin=False)
assert ctx.value.response.status_code == 403
assert ctx.value.response.status_code == 401
remove_from_cache("admin")


Expand All @@ -94,7 +94,7 @@ def test_gateway_auth_admin_gateway_csrftoken(galaxy_client):
remove_from_cache("admin")
with pytest.raises(GalaxyClientError) as ctx:
gc.get("v3/plugin/ansible/content/published/collections/index/", relogin=False)
assert ctx.value.response.status_code == 403
assert ctx.value.response.status_code == 401
remove_from_cache("admin")


Expand All @@ -112,7 +112,7 @@ def test_gateway_token_auth(galaxy_client):

with pytest.raises(GalaxyClientError) as ctx:
gc.get("v3/plugin/ansible/content/published/collections/index/", relogin=False)
assert ctx.value.response.status_code == 403
assert ctx.value.response.status_code == 401


@pytest.mark.deployment_standalone
Expand Down
5 changes: 4 additions & 1 deletion galaxy_ng/tests/integration/api/test_dab.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@

from ansible.galaxy.api import GalaxyError

from ..utils.iqe_utils import is_dev_env_standalone


@pytest.mark.min_hub_version("4.10dev")
@pytest.mark.all
@pytest.mark.deployment_community
@pytest.mark.skip_in_gw
def test_dab_service_index_is_not_available(ansible_config):

if not is_dev_env_standalone():
pytest.skip("This test should only run if hub is deployed without gateway")
config = ansible_config("admin")
api_prefix = config.get("api_prefix").rstrip("/")
api_client = get_client(config, request_token=True, require_auth=True)
Expand Down
2 changes: 2 additions & 0 deletions galaxy_ng/tests/integration/api/test_ui_namespace_owners.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@
@pytest.mark.deployment_standalone
@pytest.mark.api_ui
@pytest.mark.min_hub_version("4.9dev")
@pytest.mark.skip_in_gw
def test_api_ui_v1_namespace_owners_users_and_group_separation(ansible_config):

# https://issues.redhat.com/browse/AAH-3121
# Namespace owners should have a list of users that are directly added as owners.
# That list of users should -not- include users of groups that have been
# added as owners.
# TODO: make this test compatible with GW

cfg = ansible_config('partner_engineer')
with UIClient(config=cfg) as uclient:
Expand Down
6 changes: 3 additions & 3 deletions galaxy_ng/tests/integration/cli/test_cli_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def test_publish_and_install_by_self(galaxy_client, published, cleanup_collectio
@pytest.mark.cli
@pytest.mark.deployment_cloud
def test_publish_and_expect_uncertified_hidden(
ansible_config,
galaxy_client,
published,
cleanup_collections,
settings,
Expand All @@ -120,9 +120,9 @@ def test_publish_and_expect_uncertified_hidden(
ansible_galaxy(
f"collection install {published.namespace}.{published.name}",
check_retcode=0,
ansible_config=ansible_config("basic_user"),
galaxy_client=galaxy_client("basic_user"),
)
ansible_galaxy(
f"collection install {published.namespace}.{published.name}:1.0.0",
ansible_config=ansible_config("basic_user"),
galaxy_client=galaxy_client("basic_user"),
)

0 comments on commit 2a3d49d

Please sign in to comment.