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:
parent
8450e0ab2f
commit
2cb0f68a7b
|
@ -107,6 +107,11 @@ if (process.env['WEB_TEST_METADATA']) {
|
||||||
if (headless) {
|
if (headless) {
|
||||||
args.push('--headless');
|
args.push('--headless');
|
||||||
args.push('--disable-gpu');
|
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(conf, 'directConnect', true, 'is set to true for chrome');
|
||||||
setConf(
|
setConf(
|
||||||
|
|
Loading…
Reference in New Issue