3636 MODEL_REGISTRY_STANDARD_LABELS ,
3737 ISTIO_CONFIG_DICT ,
3838)
39+ from tests .model_registry .rest_api .utils import ModelRegistryV1Alpha1
3940from utilities .constants import Labels
4041from tests .model_registry .utils import (
4142 get_endpoint_from_mr_service ,
@@ -155,15 +156,16 @@ def model_registry_instance(
155156) -> Generator [ModelRegistry , Any , Any ]:
156157 istio_config = None
157158 oauth_config = None
159+ mr_class_name = ModelRegistry
158160 if is_model_registry_oauth :
159161 LOGGER .warning ("Requested Ouath Proxy configuration:" )
160162 oauth_config = OAUTH_PROXY_CONFIG_DICT
161163 else :
162164 LOGGER .warning ("Requested OSSM configuration:" )
163165 istio_config = ISTIO_CONFIG_DICT
166+ mr_class_name = ModelRegistryV1Alpha1
164167 """Creates a model registry instance with oauth proxy configuration."""
165- oauth_config = OAUTH_PROXY_CONFIG_DICT
166- with ModelRegistry (
168+ with mr_class_name (
167169 name = MR_INSTANCE_NAME ,
168170 namespace = model_registry_namespace ,
169171 label = MODEL_REGISTRY_STANDARD_LABELS ,
@@ -175,6 +177,8 @@ def model_registry_instance(
175177 wait_for_resource = True ,
176178 ) as mr :
177179 mr .wait_for_condition (condition = "Available" , status = "True" )
180+ mr .wait_for_condition (condition = "OAuthProxyAvailable" , status = "True" )
181+
178182 yield mr
179183
180184
0 commit comments