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
099ce130
Commit
099ce130
authored
Apr 13, 2016
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-generate the modulestore collection names for every test
parent
dced13a8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
12 deletions
+15
-12
common/lib/xmodule/xmodule/modulestore/tests/django_utils.py
+13
-10
lms/envs/test.py
+2
-2
No files found.
common/lib/xmodule/xmodule/modulestore/tests/django_utils.py
View file @
099ce130
...
...
@@ -93,8 +93,8 @@ def draft_mongo_store_config(data_dir):
'DOC_STORE_CONFIG'
:
{
'host'
:
MONGO_HOST
,
'port'
:
MONGO_PORT_NUM
,
'db'
:
'test_xmodule
'
,
'collection'
:
'modulestore
_{0}'
.
format
(
uuid4
()
.
hex
[:
5
])
,
'db'
:
'test_xmodule
_{}'
.
format
(
uuid4
()
.
hex
)
,
'collection'
:
'modulestore
'
,
},
'OPTIONS'
:
modulestore_options
}
...
...
@@ -120,8 +120,8 @@ def split_mongo_store_config(data_dir):
'DOC_STORE_CONFIG'
:
{
'host'
:
MONGO_HOST
,
'port'
:
MONGO_PORT_NUM
,
'db'
:
'test_xmodule
'
,
'collection'
:
'modulestore
_{0}'
.
format
(
uuid4
()
.
hex
[:
5
])
,
'db'
:
'test_xmodule
_{}'
.
format
(
uuid4
()
.
hex
)
,
'collection'
:
'modulestore
'
,
},
'OPTIONS'
:
modulestore_options
}
...
...
@@ -154,17 +154,20 @@ TEST_DATA_DIR = settings.COMMON_TEST_DATA_ROOT
# test course into this modulestore.
# If your test needs a graded course to test against, import the common/test/data/graded
# test course into this modulestore.
TEST_DATA_MIXED_MODULESTORE
=
mixed_store_config
(
TEST_DATA_DIR
,
{}
TEST_DATA_MIXED_MODULESTORE
=
functools
.
partial
(
mixed_store_config
,
TEST_DATA_DIR
,
{}
)
# All store requests now go through mixed
# Use this modulestore if you specifically want to test mongo and not a mocked modulestore.
TEST_DATA_MONGO_MODULESTORE
=
mixed_store_config
(
mkdtemp_clean
(),
{})
TEST_DATA_MONGO_MODULESTORE
=
functools
.
partial
(
mixed_store_config
,
mkdtemp_clean
(),
{})
# All store requests now go through mixed
# Use this modulestore if you specifically want to test split-mongo and not a mocked modulestore.
TEST_DATA_SPLIT_MODULESTORE
=
mixed_store_config
(
TEST_DATA_SPLIT_MODULESTORE
=
functools
.
partial
(
mixed_store_config
,
mkdtemp_clean
(),
{},
store_order
=
[
StoreConstructors
.
split
,
StoreConstructors
.
draft
]
...
...
@@ -191,7 +194,7 @@ class ModuleStoreIsolationMixin(CacheIsolationMixin):
"""
MODULESTORE
=
mixed_store_config
(
mkdtemp_clean
(),
{})
MODULESTORE
=
functools
.
partial
(
mixed_store_config
,
mkdtemp_clean
(),
{})
ENABLED_CACHES
=
[
'mongo_metadata_inheritance'
,
'loc_cache'
]
__settings_overrides
=
[]
__old_modulestores
=
[]
...
...
@@ -205,7 +208,7 @@ class ModuleStoreIsolationMixin(CacheIsolationMixin):
"""
cls
.
start_cache_isolation
()
override
=
override_settings
(
MODULESTORE
=
cls
.
MODULESTORE
,
MODULESTORE
=
cls
.
MODULESTORE
()
,
)
cls
.
__old_modulestores
.
append
(
copy
.
deepcopy
(
settings
.
MODULESTORE
))
...
...
lms/envs/test.py
View file @
099ce130
...
...
@@ -164,8 +164,8 @@ update_module_store_settings(
doc_store_settings
=
{
'host'
:
MONGO_HOST
,
'port'
:
MONGO_PORT_NUM
,
'db'
:
'test_xmodule
'
,
'collection'
:
'test_modulestore
{0}'
.
format
(
THIS_UUID
)
,
'db'
:
'test_xmodule
_{}'
.
format
(
THIS_UUID
)
,
'collection'
:
'test_modulestore
'
,
},
)
...
...
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