Enabled relaxed security

This commit is contained in:
butomo1989 2018-06-20 23:30:54 +02:00
parent 15f6541621
commit ab34ca36d9
2 changed files with 12 additions and 2 deletions

View file

@ -108,6 +108,11 @@ def appium_run(avd_name: str):
DEFAULT_LOG_PATH = '/var/log/supervisor/appium.log' DEFAULT_LOG_PATH = '/var/log/supervisor/appium.log'
cmd = 'appium --log {log}'.format(log=os.getenv('APPIUM_LOG', DEFAULT_LOG_PATH)) cmd = 'appium --log {log}'.format(log=os.getenv('APPIUM_LOG', DEFAULT_LOG_PATH))
relaxed_security = convert_str_to_bool(str(os.getenv('RELAXED_SECURITY', False)))
logger.info('Relaxed security? {rs}'.format(rs=relaxed_security))
if relaxed_security:
cmd += ' --relaxed-security'
default_web_browser = os.getenv('BROWSER') default_web_browser = os.getenv('BROWSER')
if default_web_browser == 'chrome': if default_web_browser == 'chrome':
cmd += ' --chromedriver-executable {driver}'.format(driver=CHROME_DRIVER) cmd += ' --chromedriver-executable {driver}'.format(driver=CHROME_DRIVER)

View file

@ -35,12 +35,17 @@ function prepare_geny_cloud() {
function run_appium() { function run_appium() {
echo "Preparing appium-server..." echo "Preparing appium-server..."
CMD="appium --log $APPIUM_LOG" CMD="appium --log $APPIUM_LOG"
if [ ! -z "$CONNECT_TO_GRID" ]; then if [ "$CONNECT_TO_GRID" = true ]; then
NODE_CONFIG_JSON="/root/src/nodeconfig.json" NODE_CONFIG_JSON="/root/src/nodeconfig.json"
/root/generate_config.sh $NODE_CONFIG_JSON /root/generate_config.sh $NODE_CONFIG_JSON
CMD+=" --nodeconfig $NODE_CONFIG_JSON" CMD+=" --nodeconfig $NODE_CONFIG_JSON"
fi fi
echo "Preparation is done"
if [ "$RELAXED_SECURITY" = true ]; then
CMD+=" --relaxed-security"
fi
echo "Preparation is done"
$CMD $CMD
} }