test(bazel): allow no sandbox for protractor tests (#24906)

It specifies --no-sandbox flag when running the protractor tests as
root. This is needed for running the tests inside a docker container.

PR Close #24906
This commit is contained in:
Wei Huang 2018-07-16 12:10:11 -04:00 committed by Victor Berchet
parent 8450e0ab2f
commit 2cb0f68a7b
1 changed files with 5 additions and 0 deletions

View File

@ -107,6 +107,11 @@ if (process.env['WEB_TEST_METADATA']) {
if (headless) {
args.push('--headless');
args.push('--disable-gpu');
const isRoot = process.getuid && process.getuid() == 0;
if (isRoot) {
// Specify --no-sandbox if it is started by root.
args.push('--no-sandbox');
}
}
setConf(conf, 'directConnect', true, 'is set to true for chrome');
setConf(