Update config to use API URL

This commit is contained in:
Jon Lane 2023-07-20 14:28:40 -07:00
parent 9c571c97ce
commit a1bf55ff5f
2 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@ const { site } = require( '../e2e-pw/utils' );
module.exports = async ( config ) => { module.exports = async ( config ) => {
// If BASE_URL is configured, we can assume we're on CI // If BASE_URL is configured, we can assume we're on CI
if ( process.env.BASE_URL ) { if ( process.env.API_BASE_URL ) {
await site.reset( process.env.USER_KEY, process.env.USER_SECRET ); await site.reset( process.env.USER_KEY, process.env.USER_SECRET );
} }
}; };

View File

@ -1,10 +1,10 @@
const { devices } = require( '@playwright/test' ); const { devices } = require( '@playwright/test' );
require( 'dotenv' ).config( { path: __dirname + '/.env' } ); require( 'dotenv' ).config( { path: __dirname + '/.env' } );
const { BASE_URL, CI, DEFAULT_TIMEOUT_OVERRIDE, USER_KEY, USER_SECRET } = const { API_BASE_URL, CI, DEFAULT_TIMEOUT_OVERRIDE, USER_KEY, USER_SECRET } =
process.env; process.env;
const baseURL = BASE_URL ?? 'http://localhost:8086'; const baseURL = API_BASE_URL ?? 'http://localhost:8086';
const userKey = USER_KEY ?? 'admin'; const userKey = USER_KEY ?? 'admin';
const userSecret = USER_SECRET ?? 'password'; const userSecret = USER_SECRET ?? 'password';
const base64auth = btoa( `${ userKey }:${ userSecret }` ); const base64auth = btoa( `${ userKey }:${ userSecret }` );