File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
tests/model_serving/model_server/upgrade Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -801,6 +801,7 @@ def llmd_namespace_fixture(
801801def 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
Original file line number Diff line number Diff 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 } " )
You can’t perform that action at this time.
0 commit comments