22
33from tests .model_serving .model_server .utils import verify_inference_response
44from utilities .infra import get_pods_by_isvc_label
5- from utilities .constants import ModelName , Protocols
5+ from utilities .constants import ModelFormat , ModelName , Protocols , RuntimeTemplates
66from utilities .inference_utils import Inference
7- from utilities .manifests .tgis_grpc import TGIS_INFERENCE_CONFIG
7+ from utilities .manifests .onnx import ONNX_INFERENCE_CONFIG
88
99pytestmark = pytest .mark .serverless
1010
1111
1212@pytest .mark .parametrize (
13- "model_namespace, serving_runtime_from_template, model_car_tgis_inference_service " ,
13+ "model_namespace, serving_runtime_from_template, model_car_serverless_inference_service " ,
1414 [
1515 pytest .param (
16- {"name" : "tgsi -model-car" },
16+ {"name" : f" { ModelFormat . OPENVINO } -model-car" },
1717 {
18- "name" : "tgis -runtime" ,
19- "template-name" : "tgis-grpc-serving-template" ,
18+ "name" : f" { ModelName . MNIST } -runtime" ,
19+ "template-name" : RuntimeTemplates . OVMS_KSERVE ,
2020 "multi-model" : False ,
2121 },
2222 {
23- "storage-uri" : "oci://quay.io/mwaykole/test@sha256:c526a1a3697253eb09adc65da6efaf7f36150205c3a51ab8d13b92b6a3af9c1c" # noqa: E501
23+ # Using mnist-8-1 model from OCI image
24+ "storage-uri" : "oci://quay.io/mwaykole/test@sha256:8a3217bcfa2cc5fa3d07496cff8b234acdf2c9725dd307dc0a80401f55e1a11c" # noqa: E501
2425 },
2526 )
2627 ],
2930class TestKserveModelCar :
3031 @pytest .mark .smoke
3132 @pytest .mark .jira ("RHOAIENG-13465" )
32- def test_model_car_no_restarts (self , model_car_tgis_inference_service ):
33+ def test_model_car_no_restarts (self , model_car_serverless_inference_service ):
3334 """Verify that model pod doesn't restart"""
3435 pod = get_pods_by_isvc_label (
35- client = model_car_tgis_inference_service .client ,
36- isvc = model_car_tgis_inference_service ,
36+ client = model_car_serverless_inference_service .client ,
37+ isvc = model_car_serverless_inference_service ,
3738 )[0 ]
3839 restarted_containers = [
3940 container .name for container in pod .instance .status .containerStatuses if container .restartCount > 1
@@ -42,13 +43,12 @@ def test_model_car_no_restarts(self, model_car_tgis_inference_service):
4243
4344 @pytest .mark .smoke
4445 @pytest .mark .jira ("RHOAIENG-12306" )
45- def test_model_car_using_rest (self , model_car_tgis_inference_service ):
46+ def test_model_car_using_rest (self , model_car_serverless_inference_service ):
4647 """Verify model query with token using REST"""
4748 verify_inference_response (
48- inference_service = model_car_tgis_inference_service ,
49- inference_config = TGIS_INFERENCE_CONFIG ,
50- inference_type = Inference .ALL_TOKENS ,
51- protocol = Protocols .GRPC ,
52- model_name = ModelName .FLAN_T5_SMALL_HF ,
49+ inference_service = model_car_serverless_inference_service ,
50+ inference_config = ONNX_INFERENCE_CONFIG ,
51+ inference_type = Inference .INFER ,
52+ protocol = Protocols .HTTPS ,
5353 use_default_query = True ,
5454 )
0 commit comments