Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

improve test script #49

Merged
merged 1 commit into from
Apr 17, 2018
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