Commit 019cf969 by Calen Pennington Committed by Clinton Blackburn

Use elasticsearch via docker, so that we can test against ES 1.5.2

parent 06a4c17d
language: python
python:
- "3.5"
services:
- docker
sudo: false
# Cache the pip directory. "cache: pip" doesn't work due to install override. See https://github.com/travis-ci/travis-ci/issues/3239.
cache:
- directories:
- $HOME/.cache/pip
before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- docker run --detach --publish 9200:9200 --publish 9300:9300 elasticsearch:1.5.2
install:
- pip install -U pip wheel codecov
- pip install -r requirements/test.txt
before_script:
# Give Elasticsearch time to start
- sleep 10
script:
- make validate
branches:
only:
- master
after_success:
- codecov
import os
from course_discovery.settings.base import *
# TEST SETTINGS
INSTALLED_APPS += (
'django_nose',
......@@ -31,3 +29,9 @@ DATABASES = {
},
}
# END IN-MEMORY TEST DATABASE
ELASTICSEARCH = {
'host': os.environ.get('TEST_ELASTICSEARCH_HOST', 'localhost'),
'index': 'course_discovery_test',
'connect_on_startup': True
}
......@@ -34,6 +34,8 @@ course-discovery:
volumes:
- .:/edx/app/course_discovery/course_discovery
command: /edx/app/course_discovery/devstack.sh start
environment:
TEST_ELASTICSEARCH_HOST: "es"
ports:
- "18381:18381"
- "8381:8381"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment