Skip to content

Commit

Permalink
fix(csi): wrong function arguments
Browse files Browse the repository at this point in the history
Signed-off-by: Alessio Pragliola <[email protected]>
  • Loading branch information
Al-Pragliola committed Sep 24, 2024
1 parent 20ac589 commit acf9d7e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions csi/test/e2e_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
set -e
set -o xtrace

source ./${DIR}/test_utils.sh

# This test assumes there is a Kubernetes environment up and running.
# It could be either a remote one or a local one (e.g., using KinD or minikube).

Expand All @@ -18,6 +16,8 @@ wait_for_port() {

DIR="$(dirname "$0")"

source ./${DIR}/test_utils.sh

KUBECTL=${KUBECTL:-"kubectl"}

# You can provide a local version of the model registry storage initializer
Expand Down Expand Up @@ -147,7 +147,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" 300
repeat_cmd_until "kubectl get pod -n $KSERVE_TEST_NAMESPACE --selector='component=predictor' | wc -l" "-gt 0" 300
predictor=$(kubectl get pod -n $KSERVE_TEST_NAMESPACE --selector="component=predictor" --output jsonpath='{.items[0].metadata.name}')
kubectl wait --for=condition=Ready pod/$predictor -n $KSERVE_TEST_NAMESPACE --timeout=5m

Expand Down
5 changes: 3 additions & 2 deletions csi/test/test_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ set -o xtrace

repeat_cmd_until() {
local cmd=$1
local condition=$2
local max_wait_secs=$3
local interval_secs=2
local start_time=$(date +%s)
Expand All @@ -18,9 +19,9 @@ repeat_cmd_until() {
return 1
fi

output=$($cmd)
output=$(eval $cmd)

if [$? -eq 0]; then
if [ $output $condition ]; then
break
else
sleep $interval_secs
Expand Down

0 comments on commit acf9d7e

Please sign in to comment.