File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,6 @@ kubectl delete inferenceservice sklearn-iris -n ${KF_PROFILE} || exit 1
5353# Test unauthorized access
5454TOKEN=" $( kubectl -n default create token default) "
5555BASE_URL=" localhost:8080/kserve-endpoints"
56- HTTP_CODE=$( curl -s -w " %{http_code}" " ${BASE_URL} /api/namespaces/${KF_PROFILE} /inferenceservices" -H " Authorization: Bearer ${TOKEN} " )
56+ HTTP_CODE=$( curl -s -o /dev/null - w " %{http_code}" " ${BASE_URL} /api/namespaces/${KF_PROFILE} /inferenceservices" -H " Authorization: Bearer ${TOKEN} " )
5757[[ " $HTTP_CODE " == " 403" || " $HTTP_CODE " == " 401" ]] || { echo " FAILURE: Expected 401/403, got $HTTP_CODE " ; exit 1; }
5858echo " Test succeeded. Token from unauthorized ServiceAccount cannot list InferenceServices in $KF_PROFILE namespace."
You can’t perform that action at this time.
0 commit comments