Sauce can only connect on certain ports
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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' : 'LMS TESTS',
|
||||
'TAGS' : ''
|
||||
'BUILD' : 'CMS 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'
|
||||
|
||||
Reference in New Issue
Block a user