[6.8] Add a way to disable certificate verification for FTR. (#58386) (#59187)

* Add a way to disable certificate verification for FTR. (#58386)

* Add a way to disable certificate verification for FTR.

* Remove other options

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

* Delete file

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
liza-mae 2020-03-03 11:33:41 -07:00 committed by GitHub
parent 84b51b63e4
commit 0e453cc1a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,6 +38,13 @@ async function attemptToCreateCommand(log, server, driverApi) {
if (process.env.TEST_BROWSER_HEADLESS) {
browserOptions = { chromeOptions: { args: ['headless', 'disable-gpu'] } };
}
if (process.env.NODE_TLS_REJECT_UNAUTHORIZED === '0') {
browserOptions = { chromeOptions: { args: ['ignore-certificate-errors'] } };
if (process.env.TEST_BROWSER_HEADLESS) {
browserOptions = { chromeOptions: { args: ['headless', 'disable-gpu', 'ignore-certificate-errors'] } };
}
}
const session = await server.createSession(browserOptions, driverApi.getRequiredCapabilities());
if (attemptId !== attemptCounter) return; // abort