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
c3887b0b
Commit
c3887b0b
authored
Feb 07, 2017
by
Ben Patterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix lettuce tests for Xenial compatibility and newer Chrome version.
parent
e6e32d79
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
10 deletions
+18
-10
common/djangoapps/terrain/browser.py
+2
-3
common/djangoapps/terrain/setup_prereqs.py
+16
-7
No files found.
common/djangoapps/terrain/browser.py
View file @
c3887b0b
...
...
@@ -279,10 +279,9 @@ def after_each_step(step):
@after.harvest
def
teardown_browser
(
total
):
def
saucelabs_status
(
total
):
"""
Quit the browser after executing the test
s.
Collect data for saucelab
s.
"""
if
world
.
LETTUCE_SELENIUM_CLIENT
==
'saucelabs'
:
set_saucelabs_job_status
(
world
.
jobid
,
total
.
scenarios_ran
==
total
.
scenarios_passed
)
world
.
browser
.
quit
()
common/djangoapps/terrain/setup_prereqs.py
View file @
c3887b0b
...
...
@@ -56,12 +56,19 @@ def stop_video_server(_total):
video_server
.
shutdown
()
@before.all
def
start_stub_servers
():
"""
Start all stub servers
"""
for
stub
in
SERVICES
.
keys
():
start_stub
(
stub
)
@before.each_scenario
# pylint: disable=no-member
def
process_requires_tags
(
scenario
):
def
skip_youtube_if_not_available
(
scenario
):
"""
Process the scenario tags to make sure that any
requirements are met prior to that scenario
being executed.
Scenario tags must be named with this convention:
@requires_stub_bar, where 'bar' is the name of the stub service to start
...
...
@@ -85,7 +92,7 @@ def process_requires_tags(scenario):
scenario
.
steps
=
[]
return
start_stub
(
requires
.
group
(
'server'
))
return
def
start_stub
(
name
):
...
...
@@ -124,11 +131,13 @@ def is_youtube_available(urls):
return
True
@after.
each_scenario
# pylint: disable=no-member
@after.
all
# pylint: disable=no-member
def
stop_stubs
(
_scenario
):
"""
Shut down any stub services
that were started up for the scenario
.
Shut down any stub services.
"""
# close browser to ensure no open connections to the stub servers
world
.
browser
.
quit
()
for
name
in
SERVICES
.
keys
():
stub_server
=
getattr
(
world
,
name
,
None
)
if
stub_server
is
not
None
:
...
...
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