Read redis port from test.js environment when running tests
This commit is contained in:
parent
0414307679
commit
0c4bcca7c9
@ -1,9 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Must match redis_port in config/environments/test.js
|
||||
# TODO: read from there
|
||||
REDIS_PORT=6333
|
||||
|
||||
OPT_CREATE=yes # create the test environment
|
||||
OPT_DROP=yes # drop the test environment
|
||||
|
||||
@ -11,6 +7,9 @@ cd $(dirname $0)
|
||||
BASEDIR=$(pwd)
|
||||
cd -
|
||||
|
||||
REDIS_PORT=`node -e "console.log(require('${BASEDIR}/config/environments/test.js').redis.port)"`
|
||||
export REDIS_PORT
|
||||
|
||||
cleanup() {
|
||||
if test x"$OPT_DROP" = xyes; then
|
||||
if test x"$PID_REDIS" = x; then
|
||||
|
@ -17,7 +17,7 @@ die() {
|
||||
}
|
||||
|
||||
TEST_DB="cartodb_test_user_1_db"
|
||||
REDIS_PORT=6333
|
||||
if test -z "$REDIS_PORT"; then REDIS_PORT=6333; fi
|
||||
|
||||
echo "preparing postgres..."
|
||||
dropdb "${TEST_DB}"
|
||||
|
Loading…
Reference in New Issue
Block a user