Commit 4c3dcda7 by JonahStanley

Hack to get around many types of string encodings

Changed the port listing

Changing to better readability
parent 22b3f2b1
...@@ -9,12 +9,11 @@ so that we can run the lettuce acceptance tests on SauceLabs. ...@@ -9,12 +9,11 @@ so that we can run the lettuce acceptance tests on SauceLabs.
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
import os import os
import json
PORTS = [2000, 2001, 2020, 2109, 2222, 2310, 3000, 3001, PORTS = [2000, 2001, 2020, 2109, 2222, 2310, 3000, 3001,
3030, 3210, 3333, 4000, 4001, 4040, 4321, 4502, 4503, 5000, 5001, 3030, 3210, 3333, 4000, 4001, 4040, 4321, 4502, 4503,
5050, 5555, 5432, 6000, 6001, 6060, 6666, 6543, 7000, 7070, 7774, 5050, 5555, 5432, 6060, 6666, 6543, 7000, 7070, 7774,
7777, 8003, 8031, 8080, 8081, 8765, 8888, 9000, 9001, 7777, 8003, 8031, 8080, 8081, 8765, 8888,
9080, 9090, 9876, 9999, 49221, 55001] 9080, 9090, 9876, 9999, 49221, 55001]
DESIRED_CAPABILITIES = { DESIRED_CAPABILITIES = {
...@@ -28,19 +27,25 @@ DESIRED_CAPABILITIES = { ...@@ -28,19 +27,25 @@ DESIRED_CAPABILITIES = {
'android': DesiredCapabilities.ANDROID 'android': DesiredCapabilities.ANDROID
} }
DEFAULT_CONFIG='{"PLATFORM":"Linux", "BROWSER":"chrome", "VERISON":"", "DEVICE":""}'
SAUCE_INFO = json.loads(os.environ.get('SAUCE_INFO', DEFAULT_CONFIG)) #HACK
#This needs to be done because Jenkins needs to satisfy URLs, JSON, BASH, SAUCE, and PYTHON
#This is the simplest way to adhere to all of these requirements and still be readible
DEFAULT_CONFIG = 'Linux-chrome--'
SAUCE_INFO = os.environ.get('SAUCE_INFO', DEFAULT_CONFIG).split('-')
if len(SAUCE_INFO) !=4:
SAUCE_INFO = DEFAULT_CONFIG.split('-')
# Information needed to utilize Sauce Labs. # Information needed to utilize Sauce Labs.
SAUCE = { SAUCE = {
'SAUCE_ENABLED': os.environ.get('SAUCE_ENABLED'), 'SAUCE_ENABLED': os.environ.get('SAUCE_ENABLED'),
'USERNAME': os.environ.get('SAUCE_USER_NAME'), 'USERNAME': os.environ.get('SAUCE_USER_NAME'),
'ACCESS_ID': os.environ.get('SAUCE_API_KEY'), 'ACCESS_ID': os.environ.get('SAUCE_API_KEY'),
'BROWSER': DESIRED_CAPABILITIES.get(SAUCE_INFO.get('BROWSER', 'chrome').lower(), DesiredCapabilities.CHROME), 'BROWSER': DESIRED_CAPABILITIES.get(SAUCE_INFO[0].lower(), DesiredCapabilities.CHROME),
'PLATFORM': SAUCE_INFO.get('PLATFORM', 'Linux'), 'PLATFORM': SAUCE_INFO[0],
'VERSION': SAUCE_INFO.get('VERSION', ''), 'VERSION': SAUCE_INFO[2],
'DEVICE': SAUCE_INFO.get('DEVICE', ''), 'DEVICE': SAUCE_INFO[3],
'SESSION': 'Jenkins Acceptance Tests', 'SESSION': 'Jenkins Acceptance Tests',
'BUILD': os.environ.get('JOB_NAME', 'LETTUCE TESTS'), 'BUILD': os.environ.get('JOB_NAME', 'LETTUCE TESTS'),
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment