Skip to content

Commit

Permalink
testing ci
Browse files Browse the repository at this point in the history
  • Loading branch information
agunapal committed Oct 24, 2023
1 parent f5446e9 commit 5fb8844
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions kubernetes/kserve/tests/scripts/test_mnist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,16 @@ function make_cluster_accessible() {
INGRESS_GATEWAY_SERVICE=$(kubectl get svc --namespace istio-system --selector="app=istio-ingressgateway" --output jsonpath='{.items[0].metadata.name}')
kubectl port-forward --namespace istio-system svc/${INGRESS_GATEWAY_SERVICE} 8080:80 &
echo "Wait for ports to be in forwarding"
wait_for_port_forwarding 300 10
sleep 10
#wait_for_port_forwarding 300 10
echo "Make inference request"
PREDICTION=$(curl -H "Content-Type: application/json" -H "Host: ${SERVICE_HOSTNAME}" http://${INGRESS_HOST}:${INGRESS_PORT}/v2/models/${MODEL_NAME}/infer -d @"$3")
echo "Creating a Service"
EXPECTED="$4"
if [ "${PREDICTION}" = "${EXPECTED}" ]; then
echo "Prediction: ${PREDICTION} (Expected ${EXPECTED})"
echo "SUCCESS"
else
echo "✘ Test failed: Prediction: ${PREDICTION}, expected ${EXPECTED}."
delete_minikube_cluster
exit 1
fi
}
Expand Down

0 comments on commit 5fb8844

Please sign in to comment.