DEV: Fix basic auth in smoke test

This commit is contained in:
Gerhard Schlager 2019-10-24 01:42:26 +02:00
parent e4718f1910
commit decbc9194d

View File

@ -80,10 +80,9 @@ const path = require("path");
if (process.env.AUTH_USER && process.env.AUTH_PASSWORD) {
await exec("basic authentication", () => {
return page.setExtraHTTPHeaders({
Authorization: `Basic ${new Buffer(
`${process.env.AUTH_USER}:${process.env.AUTH_PASSWORD}`
).toString("base64")}`
return page.authenticate({
username: process.env.AUTH_USER,
password: process.env.AUTH_PASSWORD
});
});
}