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
84201666
Commit
84201666
authored
Jun 26, 2017
by
Jeremy Bowman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PLAT-1597 Fix test mongo cleanup hostname in Docker devstack
parent
00ba9c70
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
5 deletions
+4
-5
pavelib/utils/envs.py
+1
-1
pavelib/utils/test/bokchoy_utils.py
+2
-2
pavelib/utils/test/utils.py
+1
-2
No files found.
pavelib/utils/envs.py
View file @
84201666
...
...
@@ -130,7 +130,7 @@ class Env(object):
}
# Mongo databases that will be dropped before/after the tests run
BOK_CHOY_
MONGO_HOST
=
'edx.devstack.mongo'
if
USING_DOCKER
else
'localhost'
MONGO_HOST
=
'edx.devstack.mongo'
if
USING_DOCKER
else
'localhost'
BOK_CHOY_MONGO_DATABASE
=
"test"
BOK_CHOY_CACHE_HOST
=
'edx.devstack.memcached'
if
USING_DOCKER
else
'0.0.0.0'
BOK_CHOY_CACHE
=
memcache
.
Client
([
'{}:11211'
.
format
(
BOK_CHOY_CACHE_HOST
)],
debug
=
0
)
...
...
pavelib/utils/test/bokchoy_utils.py
View file @
84201666
...
...
@@ -124,7 +124,7 @@ def is_mongo_running():
"""
# The mongo command will connect to the service,
# failing with a non-zero exit code if it cannot connect.
output
=
os
.
popen
(
'mongo --host {} --eval "print(
\'
running
\'
)"'
.
format
(
Env
.
BOK_CHOY_
MONGO_HOST
))
.
read
()
output
=
os
.
popen
(
'mongo --host {} --eval "print(
\'
running
\'
)"'
.
format
(
Env
.
MONGO_HOST
))
.
read
()
return
output
and
"running"
in
output
...
...
@@ -157,7 +157,7 @@ def clear_mongo():
"""
sh
(
"mongo --host {} {} --eval 'db.dropDatabase()' > /dev/null"
.
format
(
Env
.
BOK_CHOY_
MONGO_HOST
,
Env
.
MONGO_HOST
,
Env
.
BOK_CHOY_MONGO_DATABASE
,
)
)
...
...
pavelib/utils/test/utils.py
View file @
84201666
...
...
@@ -13,7 +13,6 @@ from pavelib.utils.timer import timed
from
bok_choy.browser
import
browser
MONGO_PORT_NUM
=
int
(
os
.
environ
.
get
(
'EDXAPP_TEST_MONGO_PORT'
,
'27017'
))
MONGO_HOST
=
os
.
environ
.
get
(
'EDXAPP_TEST_MONGO_HOST'
,
'localhost'
)
MINIMUM_FIREFOX_VERSION
=
28.0
__test__
=
False
# do not collect
...
...
@@ -70,7 +69,7 @@ def clean_mongo():
Clean mongo test databases
"""
sh
(
"mongo {host}:{port} {repo_root}/scripts/delete-mongo-test-dbs.js"
.
format
(
host
=
MONGO_HOST
,
host
=
Env
.
MONGO_HOST
,
port
=
MONGO_PORT_NUM
,
repo_root
=
Env
.
REPO_ROOT
,
))
...
...
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