diff --git a/.travis.yml b/.travis.yml index da6e061..dd81e73 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,8 @@ python: - "3.5" services: - redis-server +before_script: + - psql -c "CREATE DATABASE mydb;" -U postgres install: - pip install -e . -r requirements-testing.txt $DJANGO_VERSION script: @@ -17,6 +19,7 @@ after_success: env: global: - DB_HOST=localhost + - DB_NAME=mydb - REDIS_HOST=localhost matrix: - DJANGO_VERSION="django>=1.8,<1.9" diff --git a/docker-compose.yml b/docker-compose.yml index a16c1ed..7efc00f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,6 +8,7 @@ tests: - redis environment: DB_HOST: db + DB_NAME: postgres REDIS_HOST: redis db: image: postgres diff --git a/tests/settings.py b/tests/settings.py index abc4c52..925c2b6 100644 --- a/tests/settings.py +++ b/tests/settings.py @@ -11,7 +11,7 @@ DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', - 'NAME': 'postgres', + 'NAME': os.environ['DB_NAME'], 'USER': 'postgres', 'HOST': os.environ['DB_HOST'], 'PORT': 5432,