backport of commit b8a331a566 (#6611)

Co-authored-by: Michael Li <michael.li@hashicorp.com>
pull/6650/head
hc-github-team-secure-boundary 3 weeks ago committed by GitHub
parent 1d9decef85
commit f67df16ce3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -43,5 +43,22 @@ until boundary scopes list; do
sleep 1
done
c=0
until curl -s http://localhost:9203/health\?worker_info\=1 | jq -e '.worker_process_info.upstream_connection_state == "READY"' > /dev/null; do
echo 'waiting for boundary worker to be up'
((c+=1))
if [[ $c -ge $max ]]; then
die "timeout waiting for boundary worker to get healthy"
fi
sleep 1
done
# Wait a little longer to ensure the worker is fully ready before we start
# running tests. Without this, there were some flaky tests, specifically when
# trying to connect to a target in the alias tests (those are the first to run).
# The worker health check alone was not sufficient during testing, and it was
# not clear what else could be checked to ensure the worker was fully ready.
sleep 10
echo "running bats tests"
bats -p ./boundary

Loading…
Cancel
Save