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
ee23b9d1
Commit
ee23b9d1
authored
Aug 14, 2013
by
JonahStanley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed method of obtaining feature flags to environment variables
Conflicts: common/djangoapps/terrain/browser.py
parent
9fb05290
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
21 deletions
+42
-21
cms/envs/acceptance.py
+19
-9
common/djangoapps/terrain/browser.py
+3
-3
lms/envs/acceptance.py
+20
-9
No files found.
cms/envs/acceptance.py
View file @
ee23b9d1
...
...
@@ -25,6 +25,16 @@ PORTS = [80, 443, 888, 2000, 2001, 2020, 2109, 2222, 2310, 3000, 3001,
7777
,
8000
,
8001
,
8003
,
8031
,
8080
,
8081
,
8765
,
8888
,
9000
,
9001
,
9080
,
9090
,
9876
,
9999
,
49221
,
55001
]
DESIRED_CAPABILITIES
=
{
'chrome'
:
DesiredCapabilities
.
CHROME
,
'internet explorer'
:
DesiredCapabilities
.
INTERNETEXPLORER
,
'firefox'
:
DesiredCapabilities
.
FIREFOX
,
'opera'
:
DesiredCapabilities
.
OPERA
,
'iphone'
:
DesiredCapabilities
.
IPHONE
,
'ipad'
:
DesiredCapabilities
.
IPAD
,
'safari'
:
DesiredCapabilities
.
SAFARI
,
'android'
:
DesiredCapabilities
.
ANDROID
}
def
seed
():
return
os
.
getppid
()
...
...
@@ -88,15 +98,15 @@ USE_I18N = True
# Information needed to utilize Sauce Labs.
MITX_FEATURES
[
'SAUCE'
]
=
{
'
USE'
:
False
,
'USERNAME'
:
'<USERNAME>'
,
'ACCESS_ID'
:
'<ACCESS_ID>'
,
'BROWSER'
:
D
esiredCapabilities
.
CHROME
,
'PLATFORM'
:
'Linux'
,
'VERSION'
:
''
,
'DEVICE'
:
''
,
'SESSION'
:
'
Lettu
ce Tests'
,
'BUILD'
:
'CMS TESTS'
,
'
ENABLED'
:
os
.
environ
.
get
(
'ENABLED'
)
,
'USERNAME'
:
os
.
environ
.
get
(
'SAUCE_USER_NAME'
)
,
'ACCESS_ID'
:
os
.
environ
.
get
(
'SAUCE_API_KEY'
)
,
'BROWSER'
:
D
ESIRED_CAPABILITIES
.
get
(
os
.
environ
.
get
(
'SAUCE_BROWSER'
))
,
'PLATFORM'
:
os
.
environ
.
get
(
'SAUCE_PLATFORM'
)
,
'VERSION'
:
os
.
environ
.
get
(
'SAUCE_VERSION'
)
,
'DEVICE'
:
os
.
environ
.
get
(
'SAUCE_DEVICE'
)
,
'SESSION'
:
'
Jenkins Acceptan
ce Tests'
,
'BUILD'
:
os
.
environ
.
get
(
'JOB_NAME'
)
,
'CUSTOM_TAGS'
:
{}
}
...
...
common/djangoapps/terrain/browser.py
View file @
ee23b9d1
...
...
@@ -98,7 +98,7 @@ def initial_setup(server):
while
(
not
success
)
and
num_attempts
<
MAX_VALID_BROWSER_ATTEMPTS
:
# Get a browser session
if
SAUCE
.
get
(
'
USE
'
):
if
SAUCE
.
get
(
'
ENABLED
'
):
world
.
browser
=
Browser
(
'remote'
,
url
=
"http://{}:{}@ondemand.saucelabs.com:80/wd/hub"
.
format
(
config
[
'username'
],
config
[
'access-key'
]),
...
...
@@ -130,7 +130,7 @@ def initial_setup(server):
raise
IOError
(
"Could not acquire valid {driver} browser session."
.
format
(
driver
=
'remote'
))
# Set the browser size to 1280x1024
if
not
SAUCE
.
get
(
'
USE
'
):
if
not
SAUCE
.
get
(
'
ENABLED
'
):
world
.
browser
.
driver
.
set_window_size
(
1280
,
1024
)
...
...
@@ -181,6 +181,6 @@ def teardown_browser(total):
"""
Quit the browser after executing the tests.
"""
if
SAUCE
.
get
(
'
USE
'
):
if
SAUCE
.
get
(
'
ENABLED
'
):
set_job_status
(
jobid
,
total
.
scenarios_ran
==
total
.
scenarios_passed
)
world
.
browser
.
quit
()
lms/envs/acceptance.py
View file @
ee23b9d1
...
...
@@ -26,6 +26,17 @@ PORTS = [80, 443, 888, 2000, 2001, 2020, 2109, 2222, 2310, 3000, 3001,
7777
,
8000
,
8001
,
8003
,
8031
,
8080
,
8081
,
8765
,
8888
,
9000
,
9001
,
9080
,
9090
,
9876
,
9999
,
49221
,
55001
]
DESIRED_CAPABILITIES
=
{
'chrome'
:
DesiredCapabilities
.
CHROME
,
'internet explorer'
:
DesiredCapabilities
.
INTERNETEXPLORER
,
'firefox'
:
DesiredCapabilities
.
FIREFOX
,
'opera'
:
DesiredCapabilities
.
OPERA
,
'iphone'
:
DesiredCapabilities
.
IPHONE
,
'ipad'
:
DesiredCapabilities
.
IPAD
,
'safari'
:
DesiredCapabilities
.
SAFARI
,
'android'
:
DesiredCapabilities
.
ANDROID
}
def
seed
():
return
os
.
getppid
()
...
...
@@ -95,15 +106,15 @@ USE_I18N = True
# Information needed to utilize Sauce Labs.
MITX_FEATURES
[
'SAUCE'
]
=
{
'
USE'
:
False
,
'USERNAME'
:
'<USERNAME>'
,
'ACCESS_ID'
:
'<ACCESS_ID>'
,
'BROWSER'
:
D
esiredCapabilities
.
CHROME
,
'PLATFORM'
:
'Linux'
,
'VERSION'
:
''
,
'DEVICE'
:
''
,
'SESSION'
:
'
Lettu
ce Tests'
,
'BUILD'
:
'CMS TESTS'
,
'
ENABLED'
:
os
.
environ
.
get
(
'ENABLED'
)
,
'USERNAME'
:
os
.
environ
.
get
(
'SAUCE_USER_NAME'
)
,
'ACCESS_ID'
:
os
.
environ
.
get
(
'SAUCE_API_KEY'
)
,
'BROWSER'
:
D
ESIRED_CAPABILITIES
.
get
(
os
.
environ
.
get
(
'SAUCE_BROWSER'
))
,
'PLATFORM'
:
os
.
environ
.
get
(
'SAUCE_PLATFORM'
)
,
'VERSION'
:
os
.
environ
.
get
(
'SAUCE_VERSION'
)
,
'DEVICE'
:
os
.
environ
.
get
(
'SAUCE_DEVICE'
)
,
'SESSION'
:
'
Jenkins Acceptan
ce Tests'
,
'BUILD'
:
os
.
environ
.
get
(
'JOB_NAME'
)
,
'CUSTOM_TAGS'
:
{}
}
...
...
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