Commit 6e5769f2 by Ben Patterson Committed by Brian Jacobel

Fix webpack service location for testing.

parent a2323797
......@@ -65,6 +65,9 @@ STATICFILES_DIRS = [
DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
MEDIA_ROOT = TEST_ROOT / "uploads"
# Webpack loader must use webpack output setting
WEBPACK_LOADER['DEFAULT']['STATS_FILE'] = TEST_ROOT / "staticfiles" / "lms" / "webpack-stats.json"
# Don't use compression during tests
PIPELINE_JS_COMPRESSOR = None
......
"""
Acceptance test suite
"""
from os import environ
from paver.easy import sh, call_task, task
from pavelib.utils.test import utils as test_utils
from pavelib.utils.test.suites.suite import TestSuite
......@@ -124,6 +125,11 @@ class AcceptanceTestSuite(TestSuite):
self.root = 'acceptance'
self.fasttest = kwargs.get('fasttest', False)
# Set the environment so that webpack understands where to compile its resources.
# This setting is expected in other environments, so we are setting it for the
# bok-choy test run.
environ['EDX_PLATFORM_SETTINGS'] = 'test_static_optimized'
if kwargs.get('system'):
systems = [kwargs['system']]
else:
......
......@@ -2,7 +2,6 @@
Class used for defining and running Bok Choy acceptance test suite
"""
from time import sleep
from urllib import urlencode
from textwrap import dedent
from common.test.acceptance.fixtures.course import CourseFixture, FixtureError
......@@ -214,6 +213,11 @@ class BokChoyTestSuite(TestSuite):
self.report_dir.makedirs_p()
test_utils.clean_reports_dir() # pylint: disable=no-value-for-parameter
# Set the environment so that webpack understands where to compile its resources.
# This setting is expected in other environments, so we are setting it for the
# bok-choy test run.
os.environ['EDX_PLATFORM_SETTINGS'] = 'test_static_optimized'
if not (self.fasttest or self.skip_clean or self.testsonly):
test_utils.clean_test_files()
......
......@@ -64,9 +64,6 @@ echo "npm version is `npm --version`"
echo "--> Cleaning npm cache"
npm cache clean
echo "setting variables that paver will use to get Django Settings"
export EDX_PLATFORM_SETTINGS=test_static_optimized
# Log any paver or ansible command timing
TIMESTAMP=$(date +%s)
export PAVER_TIMER_LOG="test_root/log/timing.paver.$TIMESTAMP.log"
......
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