From 1002990619c4606b97cfb84089c4d65a3c67e470 Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Fri, 24 Dec 2021 06:14:49 +0000 Subject: Make integration tests more Docker-friendly --- integration/scripts/browser.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'integration/scripts/browser.js') diff --git a/integration/scripts/browser.js b/integration/scripts/browser.js index e4512714b..3a69a857d 100644 --- a/integration/scripts/browser.js +++ b/integration/scripts/browser.js @@ -71,8 +71,19 @@ function writeSnapshot(name, code) { ); } +const baseOptions = { + args: [ + "--disable-gpu", + "--disable-dev-shm-usage", + "--disable-setuid-sandbox", + "--no-sandbox", + ], +}; + async function main() { - const launchOptions = USE_EXISTING_PROCESS ? { devtools: true } : undefined; + const launchOptions = USE_EXISTING_PROCESS + ? { ...baseOptions, devtools: true } + : baseOptions; const browser = await puppeteer.launch(launchOptions); const promises = []; let allTestsPassed = true; @@ -83,6 +94,8 @@ async function main() { async function runPage(key) { var page; try { + console.log("launched"); + page = await browser.newPage(); if (USE_EXISTING_PROCESS) { await page.evaluate(` -- cgit v1.2.3