forked from e621ng/e621ng
[Docker] Wait until elasticsearch is up for tests
This commit is contained in:
parent
5180d313ef
commit
36df31eb74
@ -44,7 +44,7 @@ services:
|
||||
- redis
|
||||
- memcached
|
||||
- elastic
|
||||
entrypoint: ["bundle", "exec", "rails", "test"]
|
||||
entrypoint: ["docker/test_runner.sh"]
|
||||
profiles:
|
||||
- test
|
||||
|
||||
|
6
docker/test_runner.sh
Executable file
6
docker/test_runner.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#! /bin/sh
|
||||
set -e
|
||||
echo "Waiting for elastic to come up"
|
||||
timeout 20 sh -c 'until nc -z elastic 9200; do sleep 1; done'
|
||||
|
||||
bundle exec rails test "$@"
|
Loading…
Reference in New Issue
Block a user