Skip to content

Commit

Permalink
skip if keycloak
Browse files Browse the repository at this point in the history
No-Issue
  • Loading branch information
chr-stian committed Mar 7, 2024
1 parent ba9254a commit 9ca00c6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
5 changes: 3 additions & 2 deletions galaxy_ng/tests/integration/api/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from urllib.parse import urlparse
from ..utils import get_client
from ..utils import uuid4
from ..utils.iqe_utils import is_keycloak

pytestmark = pytest.mark.qa # noqa: F821

Expand Down Expand Up @@ -67,8 +68,8 @@ def test_auth_exception(ansible_config, published):

@pytest.mark.deployment_standalone
def test_ui_login_csrftoken(galaxy_client):
# covers this scenario (CSRF Failed: Origin checking failed)
# https://issues.redhat.com/browse/AAP-21532
if is_keycloak():
pytest.skip("This test is not valid for keycloak")
gc = galaxy_client("admin")
r = gc.get("_ui/v1/auth/login/", parse_json=False)
csrftoken = r.cookies.get("csrftoken")
Expand Down
5 changes: 5 additions & 0 deletions galaxy_ng/tests/integration/utils/iqe_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,11 @@ def is_galaxy_stage():
)


def is_keycloak():
keycloak_url = os.getenv("HUB_AUTH_URL")
return bool(keycloak_url)


def is_ocp_env():
# this check will not be necessary when content signing is enabled in operator
# we also have containerized aap, in that case check proper env var as well
Expand Down
2 changes: 1 addition & 1 deletion integration_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ openapi-spec-validator
jsonschema<=4.19.0
hvac
importlib_resources
galaxykit @ git+https://github.com/ansible/galaxykit@gw
galaxykit @ git+https://github.com/ansible/galaxykit
pyyaml
2 changes: 1 addition & 1 deletion profiles/base/run_integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ cd /src/galaxy_ng/
# TODO: fix marks
set -x

$VENVPATH/bin/pytest --log-cli-level=DEBUG -v -r sx --color=yes -m "$HUB_TEST_MARKS" "$@" galaxy_ng/tests/integration
$VENVPATH/bin/pytest -v -r sx --color=yes -m "$HUB_TEST_MARKS" "$@" galaxy_ng/tests/integration
RC=$?

exit $RC

0 comments on commit 9ca00c6

Please sign in to comment.