Skip to content

Commit

Permalink
Remove --liveserver option not available on Django 1.11. See Wireclou…
Browse files Browse the repository at this point in the history
  • Loading branch information
aarranz authored and Alejandro Rodriguez committed Jul 24, 2017
1 parent 8e24690 commit edba71a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ci_scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ python manage.py migrate --noinput
python manage.py collectstatic -v 0 --noinput

# Pass the tests
${COVERAGE_CMD} run -a --branch --source=wirecloud --omit="*/wirecloud/fp74caast/*,*/wirecloud/semanticwiring/*,*/tests/*,*/tests.py" manage.py test --liveserver=${IP_ADDR}:28081 --noinput --with-xunit --nologcapture -v 2 ${TESTS}
DJANGO_LIVE_TEST_SERVER_ADDRESS="${IP_ADDR}:28081" # Used by Django 1.8-1.10
DJANGO_LIVE_TEST_SERVER_HOST="${IP_ADDR}" # Custom env variable used on Django 1.11
${COVERAGE_CMD} run -a --branch --source=wirecloud --omit="*/wirecloud/fp74caast/*,*/wirecloud/semanticwiring/*,*/tests/*,*/tests.py" manage.py test --noinput --with-xunit --nologcapture -v 2 ${TESTS}

mv .coverage ../virtenv/lib/python${PY_VERSION}/site-packages; cd ../virtenv/lib/python${PY_VERSION}/site-packages; ${WORKSPACE}/virtenv/bin/coverage xml; mv coverage.xml ${WORKSPACE}; cd ${WORKSPACE}
sed -i 's/<source>.*<\/source>/<source>src<\/source>/' coverage.xml
Expand Down
3 changes: 3 additions & 0 deletions src/wirecloud/commons/utils/testcases.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,9 @@ class WirecloudSeleniumTestCase(LiveServerTestCase, WirecloudRemoteTestCase):
base_resources = ('Wirecloud_TestOperator_1.0.zip', 'Wirecloud_Test_1.0.wgt', 'Wirecloud_test-mashup_1.0.wgt')
__test__ = False

# Only affecting Django 1.11+
host = os.environ.get('DJANGO_LIVE_TEST_SERVER_HOST', 'localhost')

@classmethod
def setUpClass(cls):

Expand Down

0 comments on commit edba71a

Please sign in to comment.