Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
No-Issue
  • Loading branch information
chr-stian committed Mar 3, 2024
1 parent c21e911 commit a3cd305
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
11 changes: 4 additions & 7 deletions galaxy_ng/tests/integration/api/test_collection_signing.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

from orionutils.generator import build_collection

from galaxy_ng.tests.integration.utils.iqe_utils import require_signature_for_approval
from galaxy_ng.tests.integration.constants import SLEEP_SECONDS_ONETIME
from galaxy_ng.tests.integration.utils import (
build_collection as galaxy_build_collection,
Expand Down Expand Up @@ -550,9 +549,8 @@ def test_move_with_no_signing_service_not_superuser_signature_required(
assert gc.get(f"v3/collections?name={artifact.name}")["meta"]["count"] == 1


@pytest.mark.skipif(not require_signature_for_approval(),
reason="GALAXY_REQUIRE_SIGNATURE_FOR_APPROVAL is required to be enabled")
def test_move_with_no_signing_service(flags, galaxy_client, settings, artifact):
def test_move_with_no_signing_service(flags, galaxy_client, settings, artifact,
skip_if_not_require_signature_for_approval):
"""
Test signature validation on the pulp {repo_href}/move_collection_version/ api when
signatures are required.
Expand Down Expand Up @@ -611,9 +609,8 @@ def test_move_with_no_signing_service(flags, galaxy_client, settings, artifact):
assert gc.get(f"v3/collections?name={artifact.name}")["meta"]["count"] == 1


@pytest.mark.skipif(not require_signature_for_approval(),
reason="GALAXY_REQUIRE_SIGNATURE_FOR_APPROVAL is required to be enabled")
def test_move_with_signing_service(flags, galaxy_client, settings, artifact):
def test_move_with_signing_service(flags, galaxy_client, settings, artifact,
skip_if_not_require_signature_for_approval):
"""
Test signature validation on the pulp {repo_href}/move_collection_version/ api when
signatures are required.
Expand Down
7 changes: 2 additions & 5 deletions galaxy_ng/tests/integration/cli/test_cli_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import logging
import pytest

from ..utils.iqe_utils import require_signature_for_approval
from ..utils import ansible_galaxy
from ..utils import get_collection_full_path
from ..utils import CollectionInspector
Expand Down Expand Up @@ -108,14 +107,12 @@ def test_publish_and_install_by_self(galaxy_client, published, cleanup_collectio
@pytest.mark.all
@pytest.mark.cli
@pytest.mark.deployment_cloud
@pytest.mark.skipif(require_signature_for_approval(), reason="This test needs refactoring to "
"work with signatures required "
"on move.")
def test_publish_and_expect_uncertified_hidden(
ansible_config,
published,
cleanup_collections,
settings
settings,
skip_if_require_signature_for_approval
):
"""A discovering/consumer user has the permission to download a specific version of an
uncertified collection, but not an unspecified version range.
Expand Down
1 change: 0 additions & 1 deletion galaxy_ng/tests/integration/utils/iqe_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,6 @@ def get_vault_loader():
return VaultSecretFetcher.from_settings(vault_settings)


@lru_cache()
def require_signature_for_approval():
ansible_config = get_ansible_config()
galaxy_client = get_galaxy_client(ansible_config)
Expand Down

0 comments on commit a3cd305

Please sign in to comment.