Commit f0b7850d by Jesse Zoldak

Merge pull request #5609 from edx/zoldak/remove-tmp-references

Remove references to /tmp in tests
parents 3974e6d9 24f90307
...@@ -138,7 +138,7 @@ CACHES = { ...@@ -138,7 +138,7 @@ CACHES = {
'mongo_metadata_inheritance': { 'mongo_metadata_inheritance': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'LOCATION': '/var/tmp/mongo_metadata_inheritance', 'LOCATION': os.path.join(tempfile.gettempdir(), 'mongo_metadata_inheritance'),
'TIMEOUT': 300, 'TIMEOUT': 300,
'KEY_FUNCTION': 'util.memcache.safe_key', 'KEY_FUNCTION': 'util.memcache.safe_key',
}, },
......
...@@ -3,6 +3,8 @@ Tests for testing the modulestore settings migration code. ...@@ -3,6 +3,8 @@ Tests for testing the modulestore settings migration code.
""" """
import copy import copy
import ddt import ddt
from tempfile import mkdtemp
from unittest import TestCase from unittest import TestCase
from xmodule.modulestore.modulestore_settings import ( from xmodule.modulestore.modulestore_settings import (
convert_module_store_setting_if_needed, convert_module_store_setting_if_needed,
...@@ -10,7 +12,6 @@ from xmodule.modulestore.modulestore_settings import ( ...@@ -10,7 +12,6 @@ from xmodule.modulestore.modulestore_settings import (
get_mixed_stores, get_mixed_stores,
) )
@ddt.ddt @ddt.ddt
class ModuleStoreSettingsMigration(TestCase): class ModuleStoreSettingsMigration(TestCase):
""" """
...@@ -35,7 +36,7 @@ class ModuleStoreSettingsMigration(TestCase): ...@@ -35,7 +36,7 @@ class ModuleStoreSettingsMigration(TestCase):
"collection": "modulestore", "collection": "modulestore",
"db": "edxapp", "db": "edxapp",
"default_class": "xmodule.hidden_module.HiddenDescriptor", "default_class": "xmodule.hidden_module.HiddenDescriptor",
"fs_root": "/edx/var/edxapp/data", "fs_root": mkdtemp(),
"host": "localhost", "host": "localhost",
"password": "password", "password": "password",
"port": 27017, "port": 27017,
......
...@@ -75,11 +75,6 @@ ...@@ -75,11 +75,6 @@
}, },
"FEEDBACK_SUBMISSION_EMAIL": "", "FEEDBACK_SUBMISSION_EMAIL": "",
"GITHUB_REPO_ROOT": "** OVERRIDDEN **", "GITHUB_REPO_ROOT": "** OVERRIDDEN **",
"GRADES_DOWNLOAD": {
"BUCKET": "edx-grades",
"ROOT_PATH": "/tmp/edx-s3/grades",
"STORAGE_TYPE": "localfs"
},
"LMS_BASE": "localhost:8003", "LMS_BASE": "localhost:8003",
"LOCAL_LOGLEVEL": "INFO", "LOCAL_LOGLEVEL": "INFO",
"LOGGING_ENV": "sandbox", "LOGGING_ENV": "sandbox",
......
...@@ -4,7 +4,7 @@ Settings for bok choy tests ...@@ -4,7 +4,7 @@ Settings for bok choy tests
import os import os
from path import path from path import path
from tempfile import mkdtemp
CONFIG_ROOT = path(__file__).abspath().dirname() # pylint: disable=E1120 CONFIG_ROOT = path(__file__).abspath().dirname() # pylint: disable=E1120
TEST_ROOT = CONFIG_ROOT.dirname().dirname() / "test_root" TEST_ROOT = CONFIG_ROOT.dirname().dirname() / "test_root"
...@@ -42,6 +42,13 @@ update_module_store_settings( ...@@ -42,6 +42,13 @@ update_module_store_settings(
default_store=os.environ.get('DEFAULT_STORE', 'draft'), default_store=os.environ.get('DEFAULT_STORE', 'draft'),
) )
###################### Grade Downloads ######################
GRADES_DOWNLOAD = {
'STORAGE_TYPE': 'localfs',
'BUCKET': 'edx-grades',
'ROOT_PATH': os.path.join(mkdtemp(), 'edx-s3', 'grades'),
}
# Configure the LMS to use our stub XQueue implementation # Configure the LMS to use our stub XQueue implementation
XQUEUE_INTERFACE['url'] = 'http://localhost:8040' XQUEUE_INTERFACE['url'] = 'http://localhost:8040'
......
...@@ -178,7 +178,7 @@ CACHES = { ...@@ -178,7 +178,7 @@ CACHES = {
'mongo_metadata_inheritance': { 'mongo_metadata_inheritance': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'LOCATION': '/var/tmp/mongo_metadata_inheritance', 'LOCATION': os.path.join(tempfile.gettempdir(), 'mongo_metadata_inheritance'),
'TIMEOUT': 300, 'TIMEOUT': 300,
'KEY_FUNCTION': 'util.memcache.safe_key', 'KEY_FUNCTION': 'util.memcache.safe_key',
}, },
......
...@@ -8,6 +8,7 @@ from watchdog.observers import Observer ...@@ -8,6 +8,7 @@ from watchdog.observers import Observer
from watchdog.events import PatternMatchingEventHandler from watchdog.events import PatternMatchingEventHandler
import glob import glob
import traceback import traceback
import os
from .utils.envs import Env from .utils.envs import Env
from .utils.cmd import cmd, django_cmd from .utils.cmd import cmd, django_cmd
...@@ -16,7 +17,15 @@ from .utils.cmd import cmd, django_cmd ...@@ -16,7 +17,15 @@ from .utils.cmd import cmd, django_cmd
COFFEE_DIRS = ['lms', 'cms', 'common'] COFFEE_DIRS = ['lms', 'cms', 'common']
SASS_LOAD_PATHS = ['./common/static/sass'] SASS_LOAD_PATHS = ['./common/static/sass']
SASS_UPDATE_DIRS = ['*/static'] SASS_UPDATE_DIRS = ['*/static']
SASS_CACHE_PATH = '/tmp/sass-cache'
# If running at Solano labs, multiple builds could be running on the
# same VM, so do not hard code the path to /tmp.
# Instead use the thread-safe temp dir.
if os.getenv('TDDIUM'):
SASS_CACHE_PATH = os.path.join(os.getenv('TDDIUM_TMPDIR'), 'sass-cache')
else:
SASS_CACHE_PATH = '/tmp/sass-cache'
THEME_COFFEE_PATHS = [] THEME_COFFEE_PATHS = []
THEME_SASS_PATHS = [] THEME_SASS_PATHS = []
......
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