Skip to content

Commit 8813cb6

Browse files
committed
fix: move resource definiition inside if blocks
1 parent 86fa04e commit 8813cb6

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

  • tests/model_explainability/trustyai_service/service

tests/model_explainability/trustyai_service/service/conftest.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ def trustyai_service_with_pvc_storage_2(
112112
"namespace": model_namespace_2.name,
113113
"name": TRUSTYAI_SERVICE_NAME,
114114
}
115-
trustyai_service = TrustyAIService(**trustyai_service_kwargs)
116115

117116
if pytestconfig.option.post_upgrade:
117+
trustyai_service = TrustyAIService(**trustyai_service_kwargs)
118118
yield trustyai_service
119119
trustyai_service.clean_up()
120120

@@ -147,9 +147,8 @@ def gaussian_credit_model_2(
147147
"name": GAUSSIAN_CREDIT_MODEL,
148148
}
149149

150-
isvc = InferenceService(**gaussian_credit_model_kwargs)
151-
152150
if pytestconfig.option.post_upgrade:
151+
isvc = InferenceService(**gaussian_credit_model_kwargs)
153152
yield isvc
154153
isvc.clean_up()
155154
else:
@@ -187,9 +186,8 @@ def mlserver_runtime_2(
187186
"name": KSERVE_MLSERVER,
188187
}
189188

190-
serving_runtime = ServingRuntime(**mlserver_runtime_kwargs)
191-
192189
if pytestconfig.option.post_upgrade:
190+
serving_runtime = ServingRuntime(**mlserver_runtime_kwargs)
193191
yield serving_runtime
194192
serving_runtime.clean_up()
195193
else:

0 commit comments

Comments
 (0)