Skip to content

Commit 5013e0b

Browse files
committed
fix test for keda cpu
Signed-off-by: Milind Waykole <mwaykole@redhat.com>
1 parent 53583a8 commit 5013e0b

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/model_serving/model_server/keda/test_isvc_keda_scaling_cpu.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from utilities.monitoring import validate_metrics_field
1616
from utilities.inference_utils import Inference
1717
from utilities.manifests.onnx import ONNX_INFERENCE_CONFIG
18+
from utilities.jira import is_jira_open
1819

1920
LOGGER = get_logger(name=__name__)
2021

@@ -66,8 +67,25 @@ def test_ovms_keda_scaling_verify_scaledobject(
6667
unprivileged_client: DynamicClient,
6768
ovms_kserve_serving_runtime,
6869
stressed_ovms_keda_inference_service: Generator[InferenceService, Any, Any],
70+
admin_client: DynamicClient,
6971
):
7072
"""Test KEDA ScaledObject configuration and run inference multiple times to trigger scaling."""
73+
74+
if is_jira_open(jira_id="RHOAIENG-31386", admin_client=admin_client):
75+
patch_operations = [
76+
{
77+
"op": "add",
78+
"path": "/spec/predictor/autoScaling/metrics/0/external/authenticationRef",
79+
"value": {"authModes": "bearer", "authenticationRef": {"name": "inference-prometheus-auth"}},
80+
}
81+
]
82+
admin_client.resources.get(api_version="v1beta1", kind="InferenceService").patch(
83+
name=stressed_ovms_keda_inference_service.name,
84+
namespace=stressed_ovms_keda_inference_service.namespace,
85+
body=patch_operations,
86+
content_type="application/json-patch+json",
87+
)
88+
7189
verify_keda_scaledobject(
7290
client=unprivileged_client,
7391
isvc=stressed_ovms_keda_inference_service,

0 commit comments

Comments
 (0)