Skip to content

Commit 16a7e85

Browse files
committed
pr comments
1 parent aa77966 commit 16a7e85

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

tests/model_serving/model_server/upgrade/conftest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,6 +801,7 @@ def llmd_namespace_fixture(
801801
def llmd_gateway_fixture(
802802
pytestconfig: pytest.Config,
803803
admin_client: DynamicClient,
804+
teardown_resources: bool,
804805
) -> Generator[Gateway, Any, Any]:
805806
"""Shared LLMD Gateway for upgrade tests."""
806807
gateway = Gateway(
@@ -820,7 +821,7 @@ def llmd_gateway_fixture(
820821
gateway_class_name=LLMDGateway.DEFAULT_CLASS,
821822
wait_for_condition=True,
822823
timeout=Timeout.TIMEOUT_1MIN,
823-
teardown=False,
824+
teardown=teardown_resources,
824825
) as gateway:
825826
yield gateway
826827

tests/model_serving/model_server/upgrade/utils.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,9 @@ def verify_gateway_accepted(gateway: Gateway) -> None:
400400
raise AssertionError(f"Gateway {gateway.name} does not exist in namespace {gateway.namespace}")
401401

402402
conditions = gateway.instance.status.get("conditions", [])
403-
accepted = any(c.get("type") == "Accepted" and c.get("status") == "True" for c in conditions)
404-
if not accepted:
403+
is_accepted = any(
404+
condition.get("type") == "Accepted" and condition.get("status") == "True"
405+
for condition in conditions
406+
)
407+
if not is_accepted:
405408
raise AssertionError(f"Gateway {gateway.name} is not Accepted. Conditions: {conditions}")

0 commit comments

Comments
 (0)