Skip to content

Commit

Permalink
fix(csi): fix body request seeding in tests
Browse files Browse the repository at this point in the history
Signed-off-by: Alessio Pragliola <[email protected]>
  • Loading branch information
Al-Pragliola committed Oct 23, 2024
1 parent 88a4cd7 commit 48b65b4
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions csi/test/e2e_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,17 @@ if ! kubectl get namespace $KSERVE_TEST_NAMESPACE &> /dev/null; then
kubectl create namespace $KSERVE_TEST_NAMESPACE
fi

echo "Creating dummy input data for testing ..."

cat <<EOF > "/tmp/iris-input.json"
{
"instances": [
[6.8, 2.8, 4.8, 1.4],
[6.0, 3.4, 4.5, 1.6]
]
}
EOF

echo "======== Finished preparing test environment ========"

echo "======== Scenario 1 - Testing with default model registry service ========"
Expand Down Expand Up @@ -154,7 +165,7 @@ spec:
EOF

# wait for pod predictor to be initialized
repeat_cmd_until "kubectl get pod -n $KSERVE_TEST_NAMESPACE --selector='component=predictor' | wc -l" "-gt 0" 60
repeat_cmd_until "kubectl get pod -n $KSERVE_TEST_NAMESPACE --selector='component=predictor' | wc -l" "-gt 0" 600
predictor_one=$(kubectl get pod -n $KSERVE_TEST_NAMESPACE --selector="component=predictor" --output jsonpath='{.items[0].metadata.name}')

kubectl wait --for=condition=Ready pod/$predictor_one -n $KSERVE_TEST_NAMESPACE --timeout=5m
Expand Down Expand Up @@ -237,7 +248,7 @@ spec:
EOF

# wait for pod predictor to be initialized
repeat_cmd_until "kubectl get pod -n $KSERVE_TEST_NAMESPACE --selector='component=predictor' --output jsonpath='{.items[*].metadata.name}' | grep sklearn-iris-test-predictor | wc -l" "-gt 0" 60
repeat_cmd_until "kubectl get pod -n $KSERVE_TEST_NAMESPACE --selector='component=predictor' --output jsonpath='{.items[*].metadata.name}' | grep sklearn-iris-test-predictor | wc -l" "-gt 0" 600
predictor_two=$(kubectl get pod -n $KSERVE_TEST_NAMESPACE --selector="component=predictor" --output jsonpath='{.items[1].metadata.name}')

kubectl wait --for=condition=Ready pod/$predictor_two -n $KSERVE_TEST_NAMESPACE --timeout=5m
Expand Down

0 comments on commit 48b65b4

Please sign in to comment.