Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
514d85c1
Commit
514d85c1
authored
Jul 02, 2015
by
Ned Batchelder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix other temp dirs that are not cleaned up properly
parent
e6e5a8d8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
8 deletions
+11
-8
common/lib/xmodule/xmodule/modulestore/tests/django_utils.py
+5
-4
common/lib/xmodule/xmodule/modulestore/tests/test_modulestore_settings.py
+3
-2
lms/envs/test.py
+3
-2
No files found.
common/lib/xmodule/xmodule/modulestore/tests/django_utils.py
View file @
514d85c1
...
@@ -4,7 +4,6 @@ Modulestore configuration for test cases.
...
@@ -4,7 +4,6 @@ Modulestore configuration for test cases.
"""
"""
import
datetime
import
datetime
import
pytz
import
pytz
from
tempfile
import
mkdtemp
from
uuid
import
uuid4
from
uuid
import
uuid4
from
mock
import
patch
from
mock
import
patch
...
@@ -16,6 +15,8 @@ from django.test.utils import override_settings
...
@@ -16,6 +15,8 @@ from django.test.utils import override_settings
from
request_cache.middleware
import
RequestCache
from
request_cache.middleware
import
RequestCache
from
courseware.field_overrides
import
OverrideFieldData
# pylint: disable=import-error
from
courseware.field_overrides
import
OverrideFieldData
# pylint: disable=import-error
from
openedx.core.lib.tempdir
import
mkdtemp_clean
from
xmodule.contentstore.django
import
_CONTENTSTORE
from
xmodule.contentstore.django
import
_CONTENTSTORE
from
xmodule.modulestore
import
ModuleStoreEnum
from
xmodule.modulestore
import
ModuleStoreEnum
from
xmodule.modulestore.django
import
modulestore
,
clear_existing_modulestores
from
xmodule.modulestore.django
import
modulestore
,
clear_existing_modulestores
...
@@ -184,13 +185,13 @@ TEST_DATA_MIXED_GRADED_MODULESTORE = mixed_store_config(
...
@@ -184,13 +185,13 @@ TEST_DATA_MIXED_GRADED_MODULESTORE = mixed_store_config(
# All store requests now go through mixed
# All store requests now go through mixed
# Use this modulestore if you specifically want to test mongo and not a mocked modulestore.
# Use this modulestore if you specifically want to test mongo and not a mocked modulestore.
# This modulestore definition below will not load any xml courses.
# This modulestore definition below will not load any xml courses.
TEST_DATA_MONGO_MODULESTORE
=
mixed_store_config
(
mkdtemp
(),
{},
include_xml
=
False
)
TEST_DATA_MONGO_MODULESTORE
=
mixed_store_config
(
mkdtemp
_clean
(),
{},
include_xml
=
False
)
# All store requests now go through mixed
# All store requests now go through mixed
# Use this modulestore if you specifically want to test split-mongo and not a mocked modulestore.
# Use this modulestore if you specifically want to test split-mongo and not a mocked modulestore.
# This modulestore definition below will not load any xml courses.
# This modulestore definition below will not load any xml courses.
TEST_DATA_SPLIT_MODULESTORE
=
mixed_store_config
(
TEST_DATA_SPLIT_MODULESTORE
=
mixed_store_config
(
mkdtemp
(),
mkdtemp
_clean
(),
{},
{},
include_xml
=
False
,
include_xml
=
False
,
store_order
=
[
StoreConstructors
.
split
,
StoreConstructors
.
draft
]
store_order
=
[
StoreConstructors
.
split
,
StoreConstructors
.
draft
]
...
@@ -235,7 +236,7 @@ class ModuleStoreTestCase(TestCase):
...
@@ -235,7 +236,7 @@ class ModuleStoreTestCase(TestCase):
your `setUp()` method.
your `setUp()` method.
"""
"""
MODULESTORE
=
mixed_store_config
(
mkdtemp
(),
{},
include_xml
=
False
)
MODULESTORE
=
mixed_store_config
(
mkdtemp
_clean
(),
{},
include_xml
=
False
)
def
setUp
(
self
,
**
kwargs
):
def
setUp
(
self
,
**
kwargs
):
"""
"""
...
...
common/lib/xmodule/xmodule/modulestore/tests/test_modulestore_settings.py
View file @
514d85c1
...
@@ -3,7 +3,8 @@ Tests for testing the modulestore settings migration code.
...
@@ -3,7 +3,8 @@ Tests for testing the modulestore settings migration code.
"""
"""
import
copy
import
copy
import
ddt
import
ddt
from
tempfile
import
mkdtemp
from
openedx.core.lib.tempdir
import
mkdtemp_clean
from
unittest
import
TestCase
from
unittest
import
TestCase
from
xmodule.modulestore.modulestore_settings
import
(
from
xmodule.modulestore.modulestore_settings
import
(
...
@@ -37,7 +38,7 @@ class ModuleStoreSettingsMigration(TestCase):
...
@@ -37,7 +38,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"
:
mkdtemp
(),
"fs_root"
:
mkdtemp
_clean
(),
"host"
:
"localhost"
,
"host"
:
"localhost"
,
"password"
:
"password"
,
"password"
:
"password"
,
"port"
:
27017
,
"port"
:
27017
,
...
...
lms/envs/test.py
View file @
514d85c1
...
@@ -21,10 +21,11 @@ sessions. Assumes structure:
...
@@ -21,10 +21,11 @@ sessions. Assumes structure:
from
.common
import
*
from
.common
import
*
import
os
import
os
from
path
import
path
from
path
import
path
from
tempfile
import
mkdtemp
from
uuid
import
uuid4
from
uuid
import
uuid4
from
warnings
import
filterwarnings
,
simplefilter
from
warnings
import
filterwarnings
,
simplefilter
from
openedx.core.lib.tempdir
import
mkdtemp_clean
# Silence noisy logs to make troubleshooting easier when tests fail.
# Silence noisy logs to make troubleshooting easier when tests fail.
import
logging
import
logging
LOG_OVERRIDES
=
[
LOG_OVERRIDES
=
[
...
@@ -151,7 +152,7 @@ update_module_store_settings(
...
@@ -151,7 +152,7 @@ update_module_store_settings(
'fs_root'
:
TEST_ROOT
/
"data"
,
'fs_root'
:
TEST_ROOT
/
"data"
,
},
},
xml_store_options
=
{
xml_store_options
=
{
'data_dir'
:
mkdtemp
(
dir
=
TEST_ROOT
),
# never inadvertently load all the XML courses
'data_dir'
:
mkdtemp
_clean
(
dir
=
TEST_ROOT
),
# never inadvertently load all the XML courses
},
},
doc_store_settings
=
{
doc_store_settings
=
{
'host'
:
MONGO_HOST
,
'host'
:
MONGO_HOST
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment