Commit 870a0bfb authored by Geoff Simmons's avatar Geoff Simmons

Verification script waits more robustly for port-forward connectivity.

XXX: re-use this code wherever we wait for port-forward.
parent f4c1bb39
......@@ -16,5 +16,19 @@ kubectl port-forward svc/varnish-ingress ${LOCALPORT}:80 >/dev/null &
KUBEPID=$!
trap killforward EXIT
sleep 1
set +e
N=0
while true; do
sleep 1
cat < /dev/null > /dev/tcp/localhost/${LOCALPORT}
if [ $? -eq 0 ]; then
break
fi
if [ $N -ge 120 ]; then
echo "Giving up"
exit 1
fi
N=$(( N + 1 ))
done
set -e
varnishtest ${TESTOPTS} -Dlocalport=${LOCALPORT} deploy.vtc
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment