Skip to content

Commit

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

* Remove other options

Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
liza-mae and elasticmachine authored Feb 25, 2020
1 parent 712c085 commit c1dede7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/functional/services/remote/webdriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ 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 @@ -98,6 +99,9 @@ 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');
Expand Down

0 comments on commit c1dede7

Please sign in to comment.