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

Integration test improvements #2858

Merged
merged 11 commits into from
Mar 7, 2024
Prev Previous commit
Next Next commit
comment onto using exec
  • Loading branch information
hubertdeng123 committed Mar 7, 2024
commit ffabc9fedb1897a6f0aa8c81975c49620bf1a5ae
1 change: 1 addition & 0 deletions _integration-test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ echo "${_group}Starting Sentry for tests ..."
echo 'SENTRY_BEACON=False' >>$SENTRY_CONFIG_PY
$dc up -d
timeout 90 bash -c 'until $(curl -Isf -o /dev/null $SENTRY_TEST_HOST); do printf '.'; sleep 0.5; done'
# DC exec here is faster, tests run on the slower side and using exec would provide a boost
echo y | $dc exec web sentry createuser --force-update --superuser --email $TEST_USER --password $TEST_PASS
Copy link
Contributor

Choose a reason for hiding this comment

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

What happens if we exec into the web container but it isn't ready yet? Does docker wait until it is ready, or does this fail? If it's the former, we should echo "Waiting for Sentry..." before this runs, otherwise the user may be waiting a while. If it fails, we should add some sort of sync point to wait for the container to be up before trying this.

Copy link
Member Author

Choose a reason for hiding this comment

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

Docker compose up will only succeed if the container healthcheck for web passes, so I don't think this will be a problem. That is performed on a previous line, so when the tests get to the createuser logic the web container will always be ready

printf "Waiting for Sentry to be up"
echo ""
Expand Down
Loading