Add configured domain to ALLOWED_HOSTS. Fixes circleci tests and our runserver. (#3918)

* Add configured domain to ALLOWED_HOSTS. Fixes circleci tests and our runserver.
* Correctly map uitests to olympia.dev
This commit is contained in:
Christopher Grebs 2016-11-02 16:56:10 +01:00 коммит произвёл GitHub
Родитель 3f791cfb69
Коммит 717ca578ce
2 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -1,6 +1,8 @@
machine:
services:
- docker
hosts:
olympia.dev: 127.0.0.1
dependencies:
override:
@ -20,7 +22,7 @@ test:
- docker-compose run web ./scripts/setup-docker.sh
override:
- tox -e ui-tests --
--base-url=http://127.0.0.1
--base-url=http://olympia.dev
--firefox-path=firefox/firefox
--junit-xml=$CIRCLE_TEST_REPORTS/junit.xml
--html=$CIRCLE_ARTIFACTS/results.html

Просмотреть файл

@ -6,6 +6,7 @@ won't be tracked in git).
"""
import os
import re
from urlparse import urlparse
from olympia.lib.settings_base import * # noqa
@ -71,9 +72,11 @@ ADDONS_LINTER_BIN = os.getenv(
ES_DEFAULT_NUM_REPLICAS = 0
SITE_URL = os.environ.get('OLYMPIA_SITE_URL') or 'http://localhost:8000'
SERVICES_DOMAIN = re.sub(r'^https?:\/\/', '', SITE_URL)
SERVICES_DOMAIN = urlparse(SITE_URL).netloc
SERVICES_URL = SITE_URL
ALLOWED_HOSTS = ALLOWED_HOSTS + [SERVICES_DOMAIN]
ADDON_COLLECTOR_ID = 1
# Default AMO user id to use for tasks (from users.json fixture in zadmin).