generated from RedHatQE/python-template-repository
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[model server] Refactor fixtures to re-use code (#88)
* Create size-labeler.yml * Delete .github/workflows/size-labeler.yml * re-use fixtures * re-use fixtures * fix fixture name * fix kwargs names * fix wait replicas model mesh * fix onnx response * fix onnx response * fix caikit expected, remove spaces
- Loading branch information
Showing
11 changed files
with
168 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
108 changes: 0 additions & 108 deletions
108
tests/model_serving/model_server/raw_deployment/conftest.py
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import pytest | ||
from _pytest.fixtures import FixtureRequest | ||
from kubernetes.dynamic import DynamicClient | ||
from ocp_resources.inference_service import InferenceService | ||
from ocp_resources.resource import ResourceEditor | ||
|
||
|
||
@pytest.fixture() | ||
def patched_http_s3_caikit_raw_isvc_visibility_label( | ||
request: FixtureRequest, | ||
admin_client: DynamicClient, | ||
s3_models_inference_service: InferenceService, | ||
) -> InferenceService: | ||
with ResourceEditor( | ||
patches={ | ||
s3_models_inference_service: { | ||
"metadata": { | ||
"labels": {"networking.kserve.io/visibility": request.param["visibility"]}, | ||
} | ||
} | ||
} | ||
): | ||
yield s3_models_inference_service |
Oops, something went wrong.