Skip to content

Commit 74593d6

Browse files
committed
remove version check for validate_authorino_operator_version_channel
1 parent dcb3e2b commit 74593d6

File tree

1 file changed

+0
-43
lines changed

1 file changed

+0
-43
lines changed

tests/model_registry/conftest.py

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@
4646
from utilities.constants import Protocols, DscComponents
4747
from model_registry import ModelRegistry as ModelRegistryClient
4848
from semver import Version
49-
from utilities.infra import get_product_version
50-
from utilities.operator_utils import get_cluster_service_version, validate_operator_subscription_channel
5149
from utilities.general import wait_for_pods_by_labels
5250

5351
LOGGER = get_logger(name=__name__)
@@ -354,47 +352,6 @@ def model_registry_instance_pod(admin_client: DynamicClient) -> Generator[Pod, A
354352
)[0]
355353

356354

357-
@pytest.fixture(scope="package", autouse=True)
358-
def validate_authorino_operator_version_channel(admin_client: DynamicClient) -> None:
359-
"""Check if Authorino operator is installed with required version and channel.
360-
361-
This fixture is automatically used for all tests in the model_registry directory.
362-
It verifies that:
363-
1. For OpenShift AI: The product version is >= 2.20
364-
2. The Authorino operator is installed
365-
3. The Authorino operator is using the required channel (stable)
366-
4. The Authorino operator is at least version 1.2.1
367-
"""
368-
distribution = py_config["distribution"]
369-
if distribution == "upstream":
370-
# TODO: figure out minimum version for ODH
371-
LOGGER.info(f"Skipping Authorino operator check for {distribution} distribution")
372-
return
373-
# Only check product version for OpenShift AI
374-
if distribution == "downstream":
375-
product_version = get_product_version(admin_client=admin_client)
376-
if product_version < MIN_MR_VERSION:
377-
LOGGER.info(
378-
"Skipping Authorino operator check - product version "
379-
f"{product_version} is below required {MIN_MR_VERSION}"
380-
)
381-
return
382-
operator_name = "authorino-operator"
383-
# Find the CSV for the operator
384-
authorino_csv = get_cluster_service_version(
385-
client=admin_client, prefix=operator_name, namespace=py_config["applications_namespace"]
386-
)
387-
current_authorino_version = authorino_csv.instance.spec.version
388-
if Version.parse(version="1.2.1") > Version.parse(version=current_authorino_version):
389-
pytest.exit(
390-
f"Authorino operator is not at least version 1.2.1. Current version: {current_authorino_version}"
391-
)
392-
393-
validate_operator_subscription_channel(
394-
client=admin_client, namespace="openshift-operators", operator_name=operator_name, channel_name="stable"
395-
)
396-
397-
398355
@pytest.fixture(scope="class")
399356
def is_model_registry_oauth(request: FixtureRequest) -> bool:
400357
return getattr(request, "param", {}).get("use_oauth_proxy", False)

0 commit comments

Comments
 (0)