Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Wait for guac server to start before running tests #1383

Merged
merged 1 commit into from
Oct 11, 2023
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
17 changes: 16 additions & 1 deletion internal/testing/e2e/e2e
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,22 @@ popd
echo @@@@ Starting up guac server in background
go run "${GUAC_DIR}/cmd/guacgql" &

sleep 15
echo -n "Waiting for guac server to start"

set +e
for iteration in {1..36} ; do
sleep 5
curl -s http://localhost:8080/query >/dev/null 2>&1
if [ $? -ne 7 ] ; then
break
fi
echo -n "."
done
set -e
echo

curl -s http://localhost:8080/query >/dev/null 2>&1 || (echo "Guac server not running in time" && exit 1)
echo "Guac server started"

echo @@@@ Ingesting guac-data into server
go run "${GUAC_DIR}/cmd/guacone" collect files "${GUAC_DIR}/guac-data/docs/"
Expand Down
Loading