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
9fb05290
Commit
9fb05290
authored
Aug 13, 2013
by
JonahStanley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sauce can only connect on certain ports
parent
3cf80837
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
12 deletions
+22
-12
cms/envs/acceptance.py
+8
-3
common/djangoapps/terrain/browser.py
+4
-3
lms/envs/acceptance.py
+10
-6
No files found.
cms/envs/acceptance.py
View file @
9fb05290
...
...
@@ -18,7 +18,12 @@ DEBUG = True
import
logging
logging
.
disable
(
logging
.
ERROR
)
import
os
import
random
from
random
import
choice
PORTS
=
[
80
,
443
,
888
,
2000
,
2001
,
2020
,
2109
,
2222
,
2310
,
3000
,
3001
,
3030
,
3210
,
3333
,
4000
,
4001
,
4040
,
4321
,
4502
,
4503
,
5000
,
5001
,
5050
,
5555
,
5432
,
6000
,
6001
,
6060
,
6666
,
6543
,
7000
,
7070
,
7774
,
7777
,
8000
,
8001
,
8003
,
8031
,
8080
,
8081
,
8765
,
8888
,
9000
,
9001
,
9080
,
9090
,
9876
,
9999
,
49221
,
55001
]
def
seed
():
...
...
@@ -92,11 +97,11 @@ MITX_FEATURES['SAUCE'] = {
'DEVICE'
:
''
,
'SESSION'
:
'Lettuce Tests'
,
'BUILD'
:
'CMS TESTS'
,
'
TAGS'
:
''
'
CUSTOM_TAGS'
:
{}
}
# Include the lettuce app for acceptance testing, including the 'harvest' django-admin command
INSTALLED_APPS
+=
(
'lettuce.django'
,)
LETTUCE_APPS
=
(
'contentstore'
,)
LETTUCE_SERVER_PORT
=
random
.
randint
(
1024
,
65535
)
LETTUCE_SERVER_PORT
=
choice
(
PORTS
)
LETTUCE_BROWSER
=
'chrome'
common/djangoapps/terrain/browser.py
View file @
9fb05290
...
...
@@ -62,7 +62,7 @@ desired_capabilities['version'] = SAUCE.get('VERSION', '')
desired_capabilities
[
'device-type'
]
=
SAUCE
.
get
(
'DEVICE'
,
''
)
desired_capabilities
[
'name'
]
=
SAUCE
.
get
(
'SESSION'
,
'Lettuce Tests'
)
desired_capabilities
[
'build'
]
=
SAUCE
.
get
(
'BUILD'
,
'edX Plaform'
)
desired_capabilities
[
'
tags'
]
=
SAUCE
.
get
(
'
TAGS'
,
''
)
desired_capabilities
[
'
custom-data'
]
=
SAUCE
.
get
(
'CUSTOM_
TAGS'
,
''
)
desired_capabilities
[
'video-upload-on-pass'
]
=
False
desired_capabilities
[
'sauce-advisor'
]
=
False
desired_capabilities
[
'record-screenshots'
]
=
False
...
...
@@ -104,12 +104,13 @@ def initial_setup(server):
url
=
"http://{}:{}@ondemand.saucelabs.com:80/wd/hub"
.
format
(
config
[
'username'
],
config
[
'access-key'
]),
**
desired_capabilities
)
global
jobid
jobid
=
world
.
browser
.
driver
.
session_id
else
:
world
.
browser
=
Browser
(
browser_driver
)
world
.
browser
.
driver
.
implicitly_wait
(
30
)
global
jobid
jobid
=
world
.
browser
.
driver
.
session_id
# Try to visit the main page
# If the browser session is invalid, this will
# raise a WebDriverException
...
...
lms/envs/acceptance.py
View file @
9fb05290
...
...
@@ -19,8 +19,12 @@ DEBUG = True
import
logging
logging
.
disable
(
logging
.
ERROR
)
import
os
import
random
from
random
import
choice
PORTS
=
[
80
,
443
,
888
,
2000
,
2001
,
2020
,
2109
,
2222
,
2310
,
3000
,
3001
,
3030
,
3210
,
3333
,
4000
,
4001
,
4040
,
4321
,
4502
,
4503
,
5000
,
5001
,
5050
,
5555
,
5432
,
6000
,
6001
,
6060
,
6666
,
6543
,
7000
,
7070
,
7774
,
7777
,
8000
,
8001
,
8003
,
8031
,
8080
,
8081
,
8765
,
8888
,
9000
,
9001
,
9080
,
9090
,
9876
,
9999
,
49221
,
55001
]
def
seed
():
return
os
.
getppid
()
...
...
@@ -67,7 +71,7 @@ DATABASES = {
# Set up XQueue information so that the lms will send
# requests to a mock XQueue server running locally
XQUEUE_PORT
=
random
.
randint
(
1024
,
65535
)
XQUEUE_PORT
=
choice
(
PORTS
)
XQUEUE_INTERFACE
=
{
"url"
:
"http://127.0.0.1:
%
d"
%
XQUEUE_PORT
,
"django_auth"
:
{
...
...
@@ -99,12 +103,12 @@ MITX_FEATURES['SAUCE'] = {
'VERSION'
:
''
,
'DEVICE'
:
''
,
'SESSION'
:
'Lettuce Tests'
,
'BUILD'
:
'
L
MS TESTS'
,
'
TAGS'
:
''
'BUILD'
:
'
C
MS TESTS'
,
'
CUSTOM_TAGS'
:
{}
}
# Include the lettuce app for acceptance testing, including the 'harvest' django-admin command
INSTALLED_APPS
+=
(
'lettuce.django'
,)
LETTUCE_APPS
=
(
'courseware'
,)
LETTUCE_SERVER_PORT
=
random
.
randint
(
1024
,
65535
)
LETTUCE_SERVER_PORT
=
choice
(
PORTS
)
LETTUCE_BROWSER
=
'chrome'
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