diff --git a/testsuite/tests/kuadrant/authorino/authorization/opa/external_registry/test_auto_refresh_policy.py b/testsuite/tests/kuadrant/authorino/authorization/opa/external_registry/test_auto_refresh_policy.py index ba7b08df..35bd066c 100644 --- a/testsuite/tests/kuadrant/authorino/authorization/opa/external_registry/test_auto_refresh_policy.py +++ b/testsuite/tests/kuadrant/authorino/authorization/opa/external_registry/test_auto_refresh_policy.py @@ -10,6 +10,9 @@ from testsuite.utils import rego_allow_header +pytestmark = [pytest.mark.authorino] + + @pytest.fixture(scope="module") def updated_header(): """Header for updated OPA policy""" diff --git a/testsuite/tests/kuadrant/authorino/authorization/opa/external_registry/test_external_registry.py b/testsuite/tests/kuadrant/authorino/authorization/opa/external_registry/test_external_registry.py index 3acb8543..9a57dc0a 100644 --- a/testsuite/tests/kuadrant/authorino/authorization/opa/external_registry/test_external_registry.py +++ b/testsuite/tests/kuadrant/authorino/authorization/opa/external_registry/test_external_registry.py @@ -1,5 +1,9 @@ """Tests for Open Policy Agent (OPA) using Mockserver Expectations as http endpoint with Rego query""" +import pytest + +pytestmark = [pytest.mark.authorino] + def test_allowed_by_opa(client, auth, header): """Tests a request that should be authorized by OPA external registry declaration""" diff --git a/testsuite/tests/kuadrant/authorino/authorization/opa/test_inline_rego.py b/testsuite/tests/kuadrant/authorino/authorization/opa/test_inline_rego.py index 0faf570b..3c8b1afd 100644 --- a/testsuite/tests/kuadrant/authorino/authorization/opa/test_inline_rego.py +++ b/testsuite/tests/kuadrant/authorino/authorization/opa/test_inline_rego.py @@ -4,6 +4,8 @@ from testsuite.utils import rego_allow_header +pytestmark = [pytest.mark.authorino] + @pytest.fixture(scope="module") def header(): diff --git a/testsuite/tests/kuadrant/authorino/caching/metadata/test_caching.py b/testsuite/tests/kuadrant/authorino/caching/metadata/test_caching.py index 94526404..8fce44dc 100644 --- a/testsuite/tests/kuadrant/authorino/caching/metadata/test_caching.py +++ b/testsuite/tests/kuadrant/authorino/caching/metadata/test_caching.py @@ -8,6 +8,9 @@ from testsuite.utils import extract_response +pytestmark = [pytest.mark.authorino] + + @pytest.fixture(scope="module") def cache_ttl(): """Returns TTL in seconds for Cached Metadata""" diff --git a/testsuite/tests/kuadrant/authorino/caching/metadata/test_not_cached.py b/testsuite/tests/kuadrant/authorino/caching/metadata/test_not_cached.py index a5262ba5..2a38dcc7 100644 --- a/testsuite/tests/kuadrant/authorino/caching/metadata/test_not_cached.py +++ b/testsuite/tests/kuadrant/authorino/caching/metadata/test_not_cached.py @@ -4,6 +4,8 @@ from testsuite.utils import extract_response +pytestmark = [pytest.mark.authorino] + @pytest.fixture(scope="module") def authorization(authorization, module_label, expectation_path): diff --git a/testsuite/tests/kuadrant/authorino/conditions/section_conditions/test_authorization_condition.py b/testsuite/tests/kuadrant/authorino/conditions/section_conditions/test_authorization_condition.py index ca43d062..8cc745e7 100644 --- a/testsuite/tests/kuadrant/authorino/conditions/section_conditions/test_authorization_condition.py +++ b/testsuite/tests/kuadrant/authorino/conditions/section_conditions/test_authorization_condition.py @@ -4,6 +4,8 @@ from testsuite.policy.authorization import Pattern +pytestmark = [pytest.mark.authorino] + @pytest.fixture(scope="module") def authorization(authorization): diff --git a/testsuite/tests/kuadrant/authorino/conditions/section_conditions/test_identity_condition.py b/testsuite/tests/kuadrant/authorino/conditions/section_conditions/test_identity_condition.py index 006b6776..f0fc79d8 100644 --- a/testsuite/tests/kuadrant/authorino/conditions/section_conditions/test_identity_condition.py +++ b/testsuite/tests/kuadrant/authorino/conditions/section_conditions/test_identity_condition.py @@ -5,6 +5,8 @@ from testsuite.policy.authorization import Pattern from testsuite.httpx.auth import HeaderApiKeyAuth +pytestmark = [pytest.mark.authorino] + @pytest.fixture(scope="module") def api_key(create_api_key, module_label): diff --git a/testsuite/tests/kuadrant/authorino/conditions/section_conditions/test_metadata_condition.py b/testsuite/tests/kuadrant/authorino/conditions/section_conditions/test_metadata_condition.py index b9aecb89..0da4a71a 100644 --- a/testsuite/tests/kuadrant/authorino/conditions/section_conditions/test_metadata_condition.py +++ b/testsuite/tests/kuadrant/authorino/conditions/section_conditions/test_metadata_condition.py @@ -4,6 +4,8 @@ from testsuite.policy.authorization import Pattern +pytestmark = [pytest.mark.authorino] + @pytest.fixture(scope="module") def mockserver_expectation(request, mockserver, module_label): diff --git a/testsuite/tests/kuadrant/authorino/conditions/section_conditions/test_response_condition.py b/testsuite/tests/kuadrant/authorino/conditions/section_conditions/test_response_condition.py index dfc44c09..c65e88f5 100644 --- a/testsuite/tests/kuadrant/authorino/conditions/section_conditions/test_response_condition.py +++ b/testsuite/tests/kuadrant/authorino/conditions/section_conditions/test_response_condition.py @@ -5,6 +5,8 @@ from testsuite.policy.authorization import Pattern, Value, JsonResponse from testsuite.utils import extract_response +pytestmark = [pytest.mark.authorino] + @pytest.fixture(scope="module") def authorization(authorization): diff --git a/testsuite/tests/kuadrant/authorino/conditions/test_patternref_expressions.py b/testsuite/tests/kuadrant/authorino/conditions/test_patternref_expressions.py index f9406df8..0d4b487e 100644 --- a/testsuite/tests/kuadrant/authorino/conditions/test_patternref_expressions.py +++ b/testsuite/tests/kuadrant/authorino/conditions/test_patternref_expressions.py @@ -4,6 +4,8 @@ from testsuite.policy.authorization import Pattern, PatternRef, AnyPattern, AllPattern +pytestmark = [pytest.mark.authorino] + @pytest.fixture(scope="module") def authorization(authorization): diff --git a/testsuite/tests/kuadrant/authorino/conditions/test_top_level_condition.py b/testsuite/tests/kuadrant/authorino/conditions/test_top_level_condition.py index 3e93c118..491c9b40 100644 --- a/testsuite/tests/kuadrant/authorino/conditions/test_top_level_condition.py +++ b/testsuite/tests/kuadrant/authorino/conditions/test_top_level_condition.py @@ -4,6 +4,8 @@ from testsuite.policy.authorization import Pattern +pytestmark = [pytest.mark.authorino] + @pytest.fixture(scope="module") def authorization(authorization, module_label): diff --git a/testsuite/tests/kuadrant/authorino/dinosaur/test_dinosaur.py b/testsuite/tests/kuadrant/authorino/dinosaur/test_dinosaur.py index 8a9cf48e..5344baae 100644 --- a/testsuite/tests/kuadrant/authorino/dinosaur/test_dinosaur.py +++ b/testsuite/tests/kuadrant/authorino/dinosaur/test_dinosaur.py @@ -4,6 +4,8 @@ import pytest +pytestmark = [pytest.mark.authorino] + ERROR_MESSAGE = { "kind": "Error", "id": "403", diff --git a/testsuite/tests/kuadrant/authorino/identity/anonymous/test_anonymous_context.py b/testsuite/tests/kuadrant/authorino/identity/anonymous/test_anonymous_context.py index 7bc688ec..dc863b46 100644 --- a/testsuite/tests/kuadrant/authorino/identity/anonymous/test_anonymous_context.py +++ b/testsuite/tests/kuadrant/authorino/identity/anonymous/test_anonymous_context.py @@ -4,6 +4,8 @@ from testsuite.utils import extract_response +pytestmark = [pytest.mark.authorino] + @pytest.fixture(scope="module") def authorization(authorization): diff --git a/testsuite/tests/kuadrant/authorino/identity/anonymous/test_anonymous_identity.py b/testsuite/tests/kuadrant/authorino/identity/anonymous/test_anonymous_identity.py index a302a214..84ccfa58 100644 --- a/testsuite/tests/kuadrant/authorino/identity/anonymous/test_anonymous_identity.py +++ b/testsuite/tests/kuadrant/authorino/identity/anonymous/test_anonymous_identity.py @@ -2,6 +2,8 @@ import pytest +pytestmark = [pytest.mark.authorino] + @pytest.fixture(scope="module") def authorization(authorization, rhsso): diff --git a/testsuite/tests/kuadrant/authorino/identity/api_key/test_api_key_context.py b/testsuite/tests/kuadrant/authorino/identity/api_key/test_api_key_context.py index ee732d22..035ea46a 100644 --- a/testsuite/tests/kuadrant/authorino/identity/api_key/test_api_key_context.py +++ b/testsuite/tests/kuadrant/authorino/identity/api_key/test_api_key_context.py @@ -4,6 +4,8 @@ from testsuite.utils import extract_response +pytestmark = [pytest.mark.authorino] + @pytest.fixture(scope="module") def authorization(authorization, api_key): diff --git a/testsuite/tests/kuadrant/authorino/identity/api_key/test_auth_credentials.py b/testsuite/tests/kuadrant/authorino/identity/api_key/test_auth_credentials.py index 9eb9f5e3..cd3c740e 100644 --- a/testsuite/tests/kuadrant/authorino/identity/api_key/test_auth_credentials.py +++ b/testsuite/tests/kuadrant/authorino/identity/api_key/test_auth_credentials.py @@ -4,6 +4,8 @@ from testsuite.policy.authorization import Credentials +pytestmark = [pytest.mark.authorino] + @pytest.fixture(scope="module", params=["authorizationHeader", "customHeader", "queryString", "cookie"]) def credentials(request): diff --git a/testsuite/tests/kuadrant/authorino/identity/api_key/test_match_expression.py b/testsuite/tests/kuadrant/authorino/identity/api_key/test_match_expression.py index f6f24d0a..5d436880 100644 --- a/testsuite/tests/kuadrant/authorino/identity/api_key/test_match_expression.py +++ b/testsuite/tests/kuadrant/authorino/identity/api_key/test_match_expression.py @@ -9,6 +9,9 @@ from testsuite.openshift import Selector, MatchExpression +pytestmark = [pytest.mark.authorino] + + @pytest.fixture(scope="module") def valid_label_selectors(module_label): """Accepted labels for selector.matchExpressions in AuthConfig""" diff --git a/testsuite/tests/kuadrant/authorino/identity/api_key/test_match_label.py b/testsuite/tests/kuadrant/authorino/identity/api_key/test_match_label.py index 4ea5a9b0..617d11c8 100644 --- a/testsuite/tests/kuadrant/authorino/identity/api_key/test_match_label.py +++ b/testsuite/tests/kuadrant/authorino/identity/api_key/test_match_label.py @@ -3,6 +3,9 @@ import pytest +pytestmark = [pytest.mark.authorino] + + @pytest.fixture(scope="module") def authorization(authorization, api_key): """Creates AuthConfig with API key identity""" diff --git a/testsuite/tests/kuadrant/authorino/identity/api_key/test_reconciliation.py b/testsuite/tests/kuadrant/authorino/identity/api_key/test_reconciliation.py index 606ad275..a1d771f5 100644 --- a/testsuite/tests/kuadrant/authorino/identity/api_key/test_reconciliation.py +++ b/testsuite/tests/kuadrant/authorino/identity/api_key/test_reconciliation.py @@ -5,6 +5,8 @@ from testsuite.httpx.auth import HeaderApiKeyAuth from testsuite.openshift import Selector +pytestmark = [pytest.mark.authorino] + @pytest.fixture(scope="function") def api_key(create_api_key, module_label): diff --git a/testsuite/tests/kuadrant/authorino/identity/auth/test_auth_identity.py b/testsuite/tests/kuadrant/authorino/identity/auth/test_auth_identity.py index 22fff120..05941ab4 100644 --- a/testsuite/tests/kuadrant/authorino/identity/auth/test_auth_identity.py +++ b/testsuite/tests/kuadrant/authorino/identity/auth/test_auth_identity.py @@ -6,6 +6,8 @@ from testsuite.oidc import OIDCProvider from testsuite.oidc.rhsso import RHSSO +pytestmark = [pytest.mark.authorino] + @pytest.fixture(scope="module") def authorization(authorization, oidc_provider): diff --git a/testsuite/tests/kuadrant/authorino/identity/auth/test_multiple_auth_identities.py b/testsuite/tests/kuadrant/authorino/identity/auth/test_multiple_auth_identities.py index 3de2d2a3..afe11d71 100644 --- a/testsuite/tests/kuadrant/authorino/identity/auth/test_multiple_auth_identities.py +++ b/testsuite/tests/kuadrant/authorino/identity/auth/test_multiple_auth_identities.py @@ -6,6 +6,8 @@ from testsuite.httpx.auth import HttpxOidcClientAuth +pytestmark = [pytest.mark.authorino] + @pytest.fixture(scope="module") def auth0_auth(auth0): diff --git a/testsuite/tests/kuadrant/authorino/identity/extended_properties/test_extended_properties.py b/testsuite/tests/kuadrant/authorino/identity/extended_properties/test_extended_properties.py index caf8a277..b8a9e82b 100644 --- a/testsuite/tests/kuadrant/authorino/identity/extended_properties/test_extended_properties.py +++ b/testsuite/tests/kuadrant/authorino/identity/extended_properties/test_extended_properties.py @@ -5,6 +5,8 @@ from testsuite.policy.authorization import Value, ValueFrom from testsuite.utils import extract_response +pytestmark = [pytest.mark.authorino] + @pytest.fixture(scope="module") def authorization(authorization, rhsso): diff --git a/testsuite/tests/kuadrant/authorino/identity/extended_properties/test_overwriting.py b/testsuite/tests/kuadrant/authorino/identity/extended_properties/test_overwriting.py index 7ecdb350..037f48b6 100644 --- a/testsuite/tests/kuadrant/authorino/identity/extended_properties/test_overwriting.py +++ b/testsuite/tests/kuadrant/authorino/identity/extended_properties/test_overwriting.py @@ -5,6 +5,8 @@ from testsuite.policy.authorization import Value from testsuite.utils import extract_response +pytestmark = [pytest.mark.authorino] + @pytest.fixture(scope="module") def authorization(authorization): diff --git a/testsuite/tests/kuadrant/authorino/identity/extended_properties/test_token_normalization.py b/testsuite/tests/kuadrant/authorino/identity/extended_properties/test_token_normalization.py index 04e5d437..fe9ecc4d 100644 --- a/testsuite/tests/kuadrant/authorino/identity/extended_properties/test_token_normalization.py +++ b/testsuite/tests/kuadrant/authorino/identity/extended_properties/test_token_normalization.py @@ -4,6 +4,8 @@ from testsuite.policy.authorization import Pattern, Value, ValueFrom from testsuite.httpx.auth import HeaderApiKeyAuth, HttpxOidcClientAuth +pytestmark = [pytest.mark.authorino] + @pytest.fixture(scope="module") def api_key(create_api_key, module_label): diff --git a/testsuite/tests/kuadrant/authorino/identity/rhsso/test_auth_credentials.py b/testsuite/tests/kuadrant/authorino/identity/rhsso/test_auth_credentials.py index 11a35289..f8cb2821 100644 --- a/testsuite/tests/kuadrant/authorino/identity/rhsso/test_auth_credentials.py +++ b/testsuite/tests/kuadrant/authorino/identity/rhsso/test_auth_credentials.py @@ -4,6 +4,8 @@ from testsuite.policy.authorization import Credentials +pytestmark = [pytest.mark.authorino] + @pytest.fixture(scope="module", params=["authorizationHeader", "customHeader", "queryString", "cookie"]) def credentials(request): diff --git a/testsuite/tests/kuadrant/authorino/identity/rhsso/test_rhsso_context.py b/testsuite/tests/kuadrant/authorino/identity/rhsso/test_rhsso_context.py index 64d9cfae..6c40086f 100644 --- a/testsuite/tests/kuadrant/authorino/identity/rhsso/test_rhsso_context.py +++ b/testsuite/tests/kuadrant/authorino/identity/rhsso/test_rhsso_context.py @@ -7,6 +7,8 @@ from testsuite.policy.authorization import ValueFrom, JsonResponse +pytestmark = [pytest.mark.authorino] + @pytest.fixture(scope="module") def authorization(authorization): diff --git a/testsuite/tests/kuadrant/authorino/identity/rhsso/test_rhsso_roles.py b/testsuite/tests/kuadrant/authorino/identity/rhsso/test_rhsso_roles.py index 56012e30..4b80dcb4 100644 --- a/testsuite/tests/kuadrant/authorino/identity/rhsso/test_rhsso_roles.py +++ b/testsuite/tests/kuadrant/authorino/identity/rhsso/test_rhsso_roles.py @@ -3,6 +3,8 @@ import pytest from testsuite.httpx.auth import HttpxOidcClientAuth +pytestmark = [pytest.mark.authorino] + @pytest.fixture(scope="function") def user_with_role(rhsso, realm_role, blame): diff --git a/testsuite/tests/kuadrant/authorino/metadata/test_http.py b/testsuite/tests/kuadrant/authorino/metadata/test_http.py index 962c3a06..612f0128 100644 --- a/testsuite/tests/kuadrant/authorino/metadata/test_http.py +++ b/testsuite/tests/kuadrant/authorino/metadata/test_http.py @@ -12,6 +12,9 @@ from testsuite.utils import ContentType +pytestmark = [pytest.mark.authorino] + + ALLOWED_COUNTRY = {"countryCode": "SK"} CHECK_COUNTRY_REGO = """allow { split(input.context.request.http.path, "/") = [_, _, country_code] diff --git a/testsuite/tests/kuadrant/authorino/metadata/test_multi_element_json.py b/testsuite/tests/kuadrant/authorino/metadata/test_multi_element_json.py index 0391d65f..8492e797 100644 --- a/testsuite/tests/kuadrant/authorino/metadata/test_multi_element_json.py +++ b/testsuite/tests/kuadrant/authorino/metadata/test_multi_element_json.py @@ -7,6 +7,7 @@ from testsuite.utils import ContentType, extract_response +pytestmark = [pytest.mark.authorino] MULTI_ELEMENT_JSON = '{"foo": "bar"}\n{"blah": "bleh"}' diff --git a/testsuite/tests/kuadrant/authorino/metadata/test_uma.py b/testsuite/tests/kuadrant/authorino/metadata/test_uma.py index b4bcee83..b17eb3d4 100644 --- a/testsuite/tests/kuadrant/authorino/metadata/test_uma.py +++ b/testsuite/tests/kuadrant/authorino/metadata/test_uma.py @@ -12,6 +12,8 @@ from testsuite.httpx.auth import HttpxOidcClientAuth +pytestmark = [pytest.mark.authorino] + VALIDATE_RESOURCE_OWNER = """ metadata := object.get(input.auth.metadata, "resource-data", [])[0] diff --git a/testsuite/tests/kuadrant/authorino/metadata/test_user_info.py b/testsuite/tests/kuadrant/authorino/metadata/test_user_info.py index e78f661c..6699cd42 100644 --- a/testsuite/tests/kuadrant/authorino/metadata/test_user_info.py +++ b/testsuite/tests/kuadrant/authorino/metadata/test_user_info.py @@ -8,6 +8,8 @@ from testsuite.httpx.auth import HttpxOidcClientAuth from testsuite.policy.authorization import Pattern +pytestmark = [pytest.mark.authorino] + @pytest.fixture(scope="module") def user2(rhsso, blame): diff --git a/testsuite/tests/kuadrant/authorino/metrics/conftest.py b/testsuite/tests/kuadrant/authorino/metrics/conftest.py index e11c4b6c..2c091677 100644 --- a/testsuite/tests/kuadrant/authorino/metrics/conftest.py +++ b/testsuite/tests/kuadrant/authorino/metrics/conftest.py @@ -9,12 +9,6 @@ from testsuite.openshift.metrics import ServiceMonitor, MetricsEndpoint, Prometheus -@pytest.fixture(scope="module") -def run_on_kuadrant(): - """Kuadrant doesn't allow customization of Authorino parameters""" - return False - - @pytest.fixture(scope="module") def prometheus(request, openshift): """ diff --git a/testsuite/tests/kuadrant/authorino/metrics/test_deep_metrics.py b/testsuite/tests/kuadrant/authorino/metrics/test_deep_metrics.py index df27d2d5..55c13462 100644 --- a/testsuite/tests/kuadrant/authorino/metrics/test_deep_metrics.py +++ b/testsuite/tests/kuadrant/authorino/metrics/test_deep_metrics.py @@ -4,6 +4,8 @@ from testsuite.policy.authorization import Value, JsonResponse +pytestmark = [pytest.mark.authorino, pytest.mark.standalone_only] + @pytest.fixture(scope="module") def mockserver_expectation(request, mockserver, module_label): diff --git a/testsuite/tests/kuadrant/authorino/metrics/test_metrics.py b/testsuite/tests/kuadrant/authorino/metrics/test_metrics.py index d36b54ae..011b5e5f 100644 --- a/testsuite/tests/kuadrant/authorino/metrics/test_metrics.py +++ b/testsuite/tests/kuadrant/authorino/metrics/test_metrics.py @@ -2,6 +2,7 @@ import pytest +pytestmark = [pytest.mark.authorino, pytest.mark.standalone_only] METRICS = [ "controller_runtime_reconcile_total", diff --git a/testsuite/tests/kuadrant/authorino/multiple_hosts/test_multiple_hosts.py b/testsuite/tests/kuadrant/authorino/multiple_hosts/test_multiple_hosts.py index a4afa5c2..8f80c558 100644 --- a/testsuite/tests/kuadrant/authorino/multiple_hosts/test_multiple_hosts.py +++ b/testsuite/tests/kuadrant/authorino/multiple_hosts/test_multiple_hosts.py @@ -1,5 +1,9 @@ """Tests AuthConfig with multiple specified hosts""" +import pytest + +pytestmark = [pytest.mark.authorino] + def test_original_host(client, auth): """Tests correct host""" diff --git a/testsuite/tests/kuadrant/authorino/multiple_hosts/test_remove_host.py b/testsuite/tests/kuadrant/authorino/multiple_hosts/test_remove_host.py index 27ccdb74..5ce00ec5 100644 --- a/testsuite/tests/kuadrant/authorino/multiple_hosts/test_remove_host.py +++ b/testsuite/tests/kuadrant/authorino/multiple_hosts/test_remove_host.py @@ -1,5 +1,9 @@ """Test host removal""" +import pytest + +pytestmark = [pytest.mark.authorino] + def test_removing_host(client, client2, auth, route, second_hostname): """Tests that after removal of the second host, it stops working, while the first one still works""" diff --git a/testsuite/tests/kuadrant/authorino/operator/clusterwide/test_all_namespace_api_key.py b/testsuite/tests/kuadrant/authorino/operator/clusterwide/test_all_namespace_api_key.py index 215a426d..5887e2df 100644 --- a/testsuite/tests/kuadrant/authorino/operator/clusterwide/test_all_namespace_api_key.py +++ b/testsuite/tests/kuadrant/authorino/operator/clusterwide/test_all_namespace_api_key.py @@ -7,6 +7,8 @@ from testsuite.httpx.auth import HeaderApiKeyAuth +pytestmark = [pytest.mark.authorino, pytest.mark.standalone_only] + @pytest.fixture(scope="module") def api_key(create_api_key, module_label, openshift2): diff --git a/testsuite/tests/kuadrant/authorino/operator/clusterwide/test_clusterwide.py b/testsuite/tests/kuadrant/authorino/operator/clusterwide/test_clusterwide.py index 48b311b1..aa85cc74 100644 --- a/testsuite/tests/kuadrant/authorino/operator/clusterwide/test_clusterwide.py +++ b/testsuite/tests/kuadrant/authorino/operator/clusterwide/test_clusterwide.py @@ -2,6 +2,8 @@ import pytest +pytestmark = [pytest.mark.authorino, pytest.mark.standalone_only] + @pytest.mark.parametrize( "client_fixture", diff --git a/testsuite/tests/kuadrant/authorino/operator/clusterwide/test_wildcard_collision.py b/testsuite/tests/kuadrant/authorino/operator/clusterwide/test_wildcard_collision.py index e9226e99..db9cdfb0 100644 --- a/testsuite/tests/kuadrant/authorino/operator/clusterwide/test_wildcard_collision.py +++ b/testsuite/tests/kuadrant/authorino/operator/clusterwide/test_wildcard_collision.py @@ -7,6 +7,8 @@ from testsuite.policy.authorization import Value, JsonResponse from testsuite.policy.authorization.auth_config import AuthConfig +pytestmark = [pytest.mark.authorino, pytest.mark.standalone_only] + @pytest.fixture(scope="module") def route(route, wildcard_domain, hostname): diff --git a/testsuite/tests/kuadrant/authorino/operator/conftest.py b/testsuite/tests/kuadrant/authorino/operator/conftest.py index d5ddef26..e69de29b 100644 --- a/testsuite/tests/kuadrant/authorino/operator/conftest.py +++ b/testsuite/tests/kuadrant/authorino/operator/conftest.py @@ -1,9 +0,0 @@ -"""Module containing common features of all Operator tests""" - -import pytest - - -@pytest.fixture(scope="module") -def run_on_kuadrant(): - """Kuadrant doesn't allow customization of Authorino parameters""" - return False diff --git a/testsuite/tests/kuadrant/authorino/operator/raw_http/test_raw_http.py b/testsuite/tests/kuadrant/authorino/operator/raw_http/test_raw_http.py index 230f1c21..514cb181 100644 --- a/testsuite/tests/kuadrant/authorino/operator/raw_http/test_raw_http.py +++ b/testsuite/tests/kuadrant/authorino/operator/raw_http/test_raw_http.py @@ -2,6 +2,10 @@ Test raw http authorization interface. """ +import pytest + +pytestmark = [pytest.mark.authorino, pytest.mark.standalone_only] + # pylint: disable=unused-argument def test_authorized_via_http(authorization, client, auth): diff --git a/testsuite/tests/kuadrant/authorino/operator/sharding/test_preexisting_auth.py b/testsuite/tests/kuadrant/authorino/operator/sharding/test_preexisting_auth.py index 8fb79936..b147c52c 100644 --- a/testsuite/tests/kuadrant/authorino/operator/sharding/test_preexisting_auth.py +++ b/testsuite/tests/kuadrant/authorino/operator/sharding/test_preexisting_auth.py @@ -5,6 +5,8 @@ from testsuite.openshift.authorino import AuthorinoCR +pytestmark = [pytest.mark.authorino, pytest.mark.standalone_only] + @pytest.fixture(scope="module") def setup_authorino(openshift, blame, testconfig, module_label, request): diff --git a/testsuite/tests/kuadrant/authorino/operator/sharding/test_sharding.py b/testsuite/tests/kuadrant/authorino/operator/sharding/test_sharding.py index 526fa7f2..9bde949c 100644 --- a/testsuite/tests/kuadrant/authorino/operator/sharding/test_sharding.py +++ b/testsuite/tests/kuadrant/authorino/operator/sharding/test_sharding.py @@ -2,6 +2,8 @@ import pytest +pytestmark = [pytest.mark.authorino, pytest.mark.standalone_only] + @pytest.fixture(scope="module") def authorino_parameters(authorino_parameters): diff --git a/testsuite/tests/kuadrant/authorino/operator/test_deploy_authorino.py b/testsuite/tests/kuadrant/authorino/operator/test_deploy_authorino.py index ba586281..a60984a5 100644 --- a/testsuite/tests/kuadrant/authorino/operator/test_deploy_authorino.py +++ b/testsuite/tests/kuadrant/authorino/operator/test_deploy_authorino.py @@ -1,5 +1,9 @@ """Tests that when you deploy Authorino through operator, when the Authorino CR reports ready, the deployment is too""" +import pytest + +pytestmark = [pytest.mark.authorino, pytest.mark.standalone_only] + def test_authorino_ready(authorino): """Test authorino deploy readiness""" diff --git a/testsuite/tests/kuadrant/authorino/operator/test_wildcard.py b/testsuite/tests/kuadrant/authorino/operator/test_wildcard.py index 032334b5..8376dff7 100644 --- a/testsuite/tests/kuadrant/authorino/operator/test_wildcard.py +++ b/testsuite/tests/kuadrant/authorino/operator/test_wildcard.py @@ -6,6 +6,8 @@ from testsuite.policy.authorization.auth_config import AuthConfig +pytestmark = [pytest.mark.authorino, pytest.mark.standalone_only] + @pytest.fixture(scope="module") def route(route, wildcard_domain, hostname): diff --git a/testsuite/tests/kuadrant/authorino/operator/tls/test_tls.py b/testsuite/tests/kuadrant/authorino/operator/tls/test_tls.py index 34a519c7..695dc361 100644 --- a/testsuite/tests/kuadrant/authorino/operator/tls/test_tls.py +++ b/testsuite/tests/kuadrant/authorino/operator/tls/test_tls.py @@ -1,5 +1,9 @@ """Tests that envoy deployed with TLS security works with Authorino""" +import pytest + +pytestmark = [pytest.mark.authorino, pytest.mark.standalone_only] + def test_valid_certificate(envoy_authority, valid_cert, auth, hostname): """Tests that valid certificate will be accepted""" diff --git a/testsuite/tests/kuadrant/authorino/operator/tls/test_webhook.py b/testsuite/tests/kuadrant/authorino/operator/tls/test_webhook.py index 98859931..cdcfdb57 100644 --- a/testsuite/tests/kuadrant/authorino/operator/tls/test_webhook.py +++ b/testsuite/tests/kuadrant/authorino/operator/tls/test_webhook.py @@ -15,6 +15,8 @@ from testsuite.utils import cert_builder from testsuite.openshift.ingress import Ingress +pytestmark = [pytest.mark.authorino, pytest.mark.standalone_only] + OPA_POLICY = """ request := json.unmarshal(input.context.request.http.body).request verb := request.operation diff --git a/testsuite/tests/kuadrant/authorino/priority/test_dependency.py b/testsuite/tests/kuadrant/authorino/priority/test_dependency.py index d6b606da..0a755e8e 100644 --- a/testsuite/tests/kuadrant/authorino/priority/test_dependency.py +++ b/testsuite/tests/kuadrant/authorino/priority/test_dependency.py @@ -4,6 +4,8 @@ from testsuite.utils import extract_response +pytestmark = [pytest.mark.authorino] + @pytest.fixture(scope="module") def mockserver_expectation(request, mockserver, module_label): diff --git a/testsuite/tests/kuadrant/authorino/priority/test_sequence_anonymous.py b/testsuite/tests/kuadrant/authorino/priority/test_sequence_anonymous.py index 1596b65c..0e370df1 100644 --- a/testsuite/tests/kuadrant/authorino/priority/test_sequence_anonymous.py +++ b/testsuite/tests/kuadrant/authorino/priority/test_sequence_anonymous.py @@ -7,6 +7,8 @@ from testsuite.utils import extract_response +pytestmark = [pytest.mark.authorino] + @pytest.fixture(scope="module") def authorization(authorization): diff --git a/testsuite/tests/kuadrant/authorino/priority/test_sequence_api_key.py b/testsuite/tests/kuadrant/authorino/priority/test_sequence_api_key.py index 85e81be3..cacc2e59 100644 --- a/testsuite/tests/kuadrant/authorino/priority/test_sequence_api_key.py +++ b/testsuite/tests/kuadrant/authorino/priority/test_sequence_api_key.py @@ -5,6 +5,8 @@ from testsuite.policy.authorization import Credentials from testsuite.utils import extract_response +pytestmark = [pytest.mark.authorino] + @pytest.fixture(scope="module") def first_label(blame): diff --git a/testsuite/tests/kuadrant/authorino/response/test_auth_json.py b/testsuite/tests/kuadrant/authorino/response/test_auth_json.py index 591f7013..954016bf 100644 --- a/testsuite/tests/kuadrant/authorino/response/test_auth_json.py +++ b/testsuite/tests/kuadrant/authorino/response/test_auth_json.py @@ -6,6 +6,8 @@ from testsuite.policy.authorization import ValueFrom, JsonResponse +pytestmark = [pytest.mark.authorino] + @pytest.fixture(scope="module") def issuer(oidc_provider): diff --git a/testsuite/tests/kuadrant/authorino/response/test_base64.py b/testsuite/tests/kuadrant/authorino/response/test_base64.py index 130c0031..232a9d8a 100644 --- a/testsuite/tests/kuadrant/authorino/response/test_base64.py +++ b/testsuite/tests/kuadrant/authorino/response/test_base64.py @@ -9,6 +9,8 @@ from testsuite.policy.authorization import ValueFrom, JsonResponse +pytestmark = [pytest.mark.authorino] + @pytest.fixture(scope="module") def authorization(authorization): diff --git a/testsuite/tests/kuadrant/authorino/response/test_deny_with.py b/testsuite/tests/kuadrant/authorino/response/test_deny_with.py index c95228c3..173f8a33 100644 --- a/testsuite/tests/kuadrant/authorino/response/test_deny_with.py +++ b/testsuite/tests/kuadrant/authorino/response/test_deny_with.py @@ -15,6 +15,8 @@ TESTING_PATH = "/deny" +pytestmark = [pytest.mark.authorino] + @pytest.fixture(scope="module") def authorization(authorization): diff --git a/testsuite/tests/kuadrant/authorino/response/test_headers.py b/testsuite/tests/kuadrant/authorino/response/test_headers.py index c2fce0e0..8fae54f7 100644 --- a/testsuite/tests/kuadrant/authorino/response/test_headers.py +++ b/testsuite/tests/kuadrant/authorino/response/test_headers.py @@ -6,6 +6,8 @@ from testsuite.policy.authorization import Value, JsonResponse +pytestmark = [pytest.mark.authorino] + @pytest.fixture(scope="module", params=["123456789", "standardCharacters", "specialcharacters+*-."]) def header_name(request): diff --git a/testsuite/tests/kuadrant/authorino/response/test_multiple_responses.py b/testsuite/tests/kuadrant/authorino/response/test_multiple_responses.py index 93bc720a..1806cdae 100644 --- a/testsuite/tests/kuadrant/authorino/response/test_multiple_responses.py +++ b/testsuite/tests/kuadrant/authorino/response/test_multiple_responses.py @@ -6,6 +6,8 @@ from testsuite.policy.authorization import Value, JsonResponse +pytestmark = [pytest.mark.authorino] + @pytest.fixture(scope="module") def authorization(authorization): diff --git a/testsuite/tests/kuadrant/authorino/response/test_redirect.py b/testsuite/tests/kuadrant/authorino/response/test_redirect.py index a985749d..35bf5e35 100644 --- a/testsuite/tests/kuadrant/authorino/response/test_redirect.py +++ b/testsuite/tests/kuadrant/authorino/response/test_redirect.py @@ -9,6 +9,8 @@ STATUS_CODE = 302 REDIRECT_URL = "http://anything.inavlid?redirect_to=" +pytestmark = [pytest.mark.authorino] + @pytest.fixture(scope="module") def authorization(authorization): diff --git a/testsuite/tests/kuadrant/authorino/response/test_simple_response.py b/testsuite/tests/kuadrant/authorino/response/test_simple_response.py index 63605b61..5f9302eb 100644 --- a/testsuite/tests/kuadrant/authorino/response/test_simple_response.py +++ b/testsuite/tests/kuadrant/authorino/response/test_simple_response.py @@ -6,6 +6,8 @@ from testsuite.policy.authorization import Value, JsonResponse +pytestmark = [pytest.mark.authorino] + @pytest.fixture(scope="module") def authorization(authorization): diff --git a/testsuite/tests/kuadrant/authorino/wristband/conftest.py b/testsuite/tests/kuadrant/authorino/wristband/conftest.py index 83df8e61..a500f276 100644 --- a/testsuite/tests/kuadrant/authorino/wristband/conftest.py +++ b/testsuite/tests/kuadrant/authorino/wristband/conftest.py @@ -11,12 +11,6 @@ from testsuite.utils import cert_builder -@pytest.fixture(scope="module") -def run_on_kuadrant(): - """Kuadrant doesn't allow customization of Authorino parameters""" - return False - - @pytest.fixture(scope="session") def oidc_provider(rhsso): """Fixture which enables switching out OIDC providers for individual modules""" diff --git a/testsuite/tests/kuadrant/authorino/wristband/test_wristband.py b/testsuite/tests/kuadrant/authorino/wristband/test_wristband.py index 2e33ae2d..964e9f91 100644 --- a/testsuite/tests/kuadrant/authorino/wristband/test_wristband.py +++ b/testsuite/tests/kuadrant/authorino/wristband/test_wristband.py @@ -1,7 +1,10 @@ """Test api authentication with wristband-token that was acquired after authentication on the edge layer""" +import pytest from jose import jwt +pytestmark = [pytest.mark.authorino, pytest.mark.standalone_only] + def test_wristband_token_claims(oidc_provider, auth, wristband_token, wristband_endpoint, certificates): """Verify acquired jwt token claims""" diff --git a/testsuite/tests/kuadrant/conftest.py b/testsuite/tests/kuadrant/conftest.py index b884f0aa..b1d27792 100644 --- a/testsuite/tests/kuadrant/conftest.py +++ b/testsuite/tests/kuadrant/conftest.py @@ -7,22 +7,9 @@ from testsuite.policy.rate_limit_policy import RateLimitPolicy -@pytest.fixture(scope="session") -def run_on_kuadrant(): - """True, if the tests should pass when running on Kuadrant""" - return True - - -@pytest.fixture(scope="module", autouse=True) -def skip_no_kuadrant(kuadrant, run_on_kuadrant): - """Skips all tests that are not working with Kuadrant""" - if kuadrant and not run_on_kuadrant: - pytest.skip("This test doesn't work with Kuadrant") - - # pylint: disable=unused-argument @pytest.fixture(scope="module") -def authorino(kuadrant, skip_no_kuadrant): +def authorino(kuadrant): """Authorino instance when configured through Kuadrant""" if kuadrant: # No available modification diff --git a/testsuite/tests/kuadrant/limitador/conftest.py b/testsuite/tests/kuadrant/limitador/conftest.py index 0b92f1db..61bcd014 100644 --- a/testsuite/tests/kuadrant/limitador/conftest.py +++ b/testsuite/tests/kuadrant/limitador/conftest.py @@ -3,14 +3,6 @@ import pytest -@pytest.fixture(scope="module") -def kuadrant(kuadrant): - """Skip if not running on Kuadrant""" - if not kuadrant: - pytest.skip("Limitador test can only run on Kuadrant for now") - return kuadrant - - @pytest.fixture(scope="module", autouse=True) def commit(request, rate_limit): """Commits all important stuff before tests""" diff --git a/testsuite/tests/kuadrant/limitador/test_basic_limit.py b/testsuite/tests/kuadrant/limitador/test_basic_limit.py index 04f35c2c..d546161a 100644 --- a/testsuite/tests/kuadrant/limitador/test_basic_limit.py +++ b/testsuite/tests/kuadrant/limitador/test_basic_limit.py @@ -6,6 +6,8 @@ from testsuite.policy.rate_limit_policy import Limit +pytestmark = [pytest.mark.kuadrant_only, pytest.mark.limitador] + @pytest.fixture( scope="module", diff --git a/testsuite/tests/kuadrant/limitador/test_multiple_iterations.py b/testsuite/tests/kuadrant/limitador/test_multiple_iterations.py index 901529d5..acf564c6 100644 --- a/testsuite/tests/kuadrant/limitador/test_multiple_iterations.py +++ b/testsuite/tests/kuadrant/limitador/test_multiple_iterations.py @@ -8,6 +8,8 @@ from testsuite.policy.rate_limit_policy import Limit +pytestmark = [pytest.mark.kuadrant_only, pytest.mark.limitador] + @pytest.fixture(scope="module") def rate_limit(rate_limit): diff --git a/testsuite/tests/kuadrant/limitador/test_route_rule.py b/testsuite/tests/kuadrant/limitador/test_route_rule.py index 787b7b1e..168dc2f9 100644 --- a/testsuite/tests/kuadrant/limitador/test_route_rule.py +++ b/testsuite/tests/kuadrant/limitador/test_route_rule.py @@ -5,6 +5,8 @@ from testsuite.gateway import RouteMatch, PathMatch, MatchType from testsuite.policy.rate_limit_policy import Limit, RouteSelector +pytestmark = [pytest.mark.kuadrant_only, pytest.mark.limitador] + @pytest.fixture(scope="module") def route(route, backend): diff --git a/testsuite/tests/kuadrant/reconciliation/test_httproute_delete.py b/testsuite/tests/kuadrant/reconciliation/test_httproute_delete.py index 2d819a6c..d1e763e0 100644 --- a/testsuite/tests/kuadrant/reconciliation/test_httproute_delete.py +++ b/testsuite/tests/kuadrant/reconciliation/test_httproute_delete.py @@ -2,6 +2,8 @@ import pytest +pytestmark = [pytest.mark.kuadrant_only] + @pytest.mark.issue("https://github.com/Kuadrant/kuadrant-operator/issues/124") def test_delete(client, route, authorization, resilient_request): diff --git a/testsuite/tests/kuadrant/reconciliation/test_httproute_hosts.py b/testsuite/tests/kuadrant/reconciliation/test_httproute_hosts.py index ca985d2b..1804550d 100644 --- a/testsuite/tests/kuadrant/reconciliation/test_httproute_hosts.py +++ b/testsuite/tests/kuadrant/reconciliation/test_httproute_hosts.py @@ -2,6 +2,8 @@ import pytest +pytestmark = [pytest.mark.kuadrant_only] + @pytest.fixture def second_hostname(exposer, gateway, blame): diff --git a/testsuite/tests/kuadrant/reconciliation/test_httproute_matches.py b/testsuite/tests/kuadrant/reconciliation/test_httproute_matches.py index 37ed7fe7..7cec1b48 100644 --- a/testsuite/tests/kuadrant/reconciliation/test_httproute_matches.py +++ b/testsuite/tests/kuadrant/reconciliation/test_httproute_matches.py @@ -1,7 +1,11 @@ """Tests that HTTPRoute spec.routes.matches changes are reconciled when changed.""" +import pytest + from testsuite.gateway import RouteMatch, PathMatch +pytestmark = [pytest.mark.kuadrant_only] + def test_matches(client, backend, route, resilient_request): """ diff --git a/testsuite/tests/kuadrant/test_rate_limit_authz.py b/testsuite/tests/kuadrant/test_rate_limit_authz.py index 71dafcba..78dda07f 100644 --- a/testsuite/tests/kuadrant/test_rate_limit_authz.py +++ b/testsuite/tests/kuadrant/test_rate_limit_authz.py @@ -7,12 +7,7 @@ from testsuite.policy.rate_limit_policy import Limit -@pytest.fixture(scope="module") -def kuadrant(kuadrant): - """Skip if not running on Kuadrant""" - if not kuadrant: - pytest.skip("Limitador tests can only run on Kuadrant for now") - return kuadrant +pytestmark = [pytest.mark.kuadrant_only, pytest.mark.limitador] @pytest.fixture(scope="module")