Skip to content

Commit b03cd0f

Browse files
committed
address review comments
1 parent c571eac commit b03cd0f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

tests/model_registry/conftest.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from contextlib import ExitStack
22

33
import pytest
4+
from kubernetes.dynamic.exceptions import ResourceNotFoundError
45
from pytest import Config
56
from typing import Generator, Any
67

@@ -224,6 +225,8 @@ def model_registry_instance_rest_endpoint(admin_client: DynamicClient, model_reg
224225
get_mr_service_by_label(client=admin_client, namespace_name=model_registry_namespace, mr_instance=mr_instance)
225226
for mr_instance in mr_instances
226227
]
228+
if not mr_services:
229+
raise ResourceNotFoundError("No model registry services found")
227230
return [get_endpoint_from_mr_service(svc=svc, protocol=Protocols.REST) for svc in mr_services]
228231

229232

@@ -359,6 +362,8 @@ def model_registry_client(
359362
is_secure=False,
360363
)
361364
)
365+
if not mr_clients:
366+
raise ResourceNotFoundError("No model registry clients created")
362367
return mr_clients
363368

364369

tests/model_registry/python_client/test_model_registry_creation.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ def test_registering_model(
5353
model_registry_client: list[ModelRegistryClient],
5454
registered_model: RegisteredModel,
5555
):
56-
assert model_registry_client
5756
model = model_registry_client[0].get_registered_model(name=MODEL_NAME)
5857
expected_attrs = {
5958
"id": registered_model.id,

0 commit comments

Comments
 (0)