mirror of
https://github.com/TracksApp/tracks.git
synced 2025-09-22 05:50:47 +02:00
Poll for the database to be up before running tests
This commit is contained in:
parent
9f65d809da
commit
49bc3eb0cd
2 changed files with 19 additions and 1 deletions
|
@ -7,6 +7,12 @@ function cleanup() {
|
|||
$docker_compose down
|
||||
}
|
||||
|
||||
function die() {
|
||||
echo $@
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
trap cleanup EXIT
|
||||
|
||||
export RAILS_ENV=test
|
||||
|
@ -16,7 +22,7 @@ cp config/site.yml.tmpl config/site.yml
|
|||
|
||||
$docker_compose build
|
||||
$docker_compose up -d
|
||||
sleep 5 # janky way of waiting for the database to be up
|
||||
script/poll-for-db
|
||||
|
||||
# Leaving this in since it will be needed for Rails 5
|
||||
# bin/rails db:environment:set RAILS_ENV=test || true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue