Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion test/scripts/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,13 @@ cd ${GO_DIR}
./deploy.sh

TIMEOUT=60
until kubectl get pods -n katib | grep 1/1 | [[ $(wc -l) -eq 7 ]]; do
PODNUM=$(kubectl get pods -n katib | grep -v NAME | wc -l)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can avoid grep like this but I don't think it matters much kubectl get pods -o jsonpath='{.items[*].metadata.name}' | wc -w

until kubectl get pods -n katib | grep 1/1 | [[ $(wc -l) -eq $PODNUM ]]; do
sleep 10
TIMEOUT=$(( TIMEOUT - 1 ))
if [[ $TIMEOUT -eq 0 ]];then
echo "NG"
kubectl get pods -n katib
exit 1
fi
done
Expand Down