Skip to content

Commit

Permalink
Add a way to disable certificate verification for FTR. (elastic#58386) (
Browse files Browse the repository at this point in the history
elastic#58522)

* Add a way to disable certificate verification for FTR.

* Remove other options

Co-authored-by: Elastic Machine <[email protected]>

Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
liza-mae and elasticmachine authored Feb 26, 2020
1 parent b4009fc commit f29de7c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/functional/services/remote/webdriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ import { Browsers } from './browsers';

const throttleOption: string = process.env.TEST_THROTTLE_NETWORK as string;
const headlessBrowser: string = process.env.TEST_BROWSER_HEADLESS as string;
const remoteDebug: string = process.env.TEST_REMOTE_DEBUG as string;
const certValidation: string = process.env.NODE_TLS_REJECT_UNAUTHORIZED as string;
const SECOND = 1000;
const MINUTE = 60 * SECOND;
const NO_QUEUE_COMMANDS = ['getLog', 'getStatus', 'newSession', 'quit'];
Expand Down Expand Up @@ -99,6 +101,13 @@ async function attemptToCreateCommand(
// See: https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md
chromeOptions.push('headless', 'disable-gpu');
}
if (certValidation === '0') {
chromeOptions.push('ignore-certificate-errors');
}
if (remoteDebug === '1') {
// Visit chrome://inspect in chrome to remotely view/debug
chromeOptions.push('headless', 'disable-gpu', 'remote-debugging-port=9222');
}
chromeCapabilities.set('goog:chromeOptions', {
w3c: false,
args: chromeOptions,
Expand Down

0 comments on commit f29de7c

Please sign in to comment.