Skip to content

Commit 42af57c

Browse files
Update kserve_models_web_application_test.sh
Signed-off-by: Julius von Kohout <[email protected]>
1 parent 035df6a commit 42af57c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/kserve_models_web_application_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@ kubectl delete inferenceservice sklearn-iris -n ${KF_PROFILE} || exit 1
5353
# Test unauthorized access
5454
TOKEN="$(kubectl -n default create token default)"
5555
BASE_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; }
5858
echo "Test succeeded. Token from unauthorized ServiceAccount cannot list InferenceServices in $KF_PROFILE namespace."

0 commit comments

Comments
 (0)