diff --git a/packages/e2e-test/src/e2e-test.ts b/packages/e2e-test/src/e2e-test.ts index c7f6137ff1..c839454426 100644 --- a/packages/e2e-test/src/e2e-test.ts +++ b/packages/e2e-test/src/e2e-test.ts @@ -328,8 +328,8 @@ async function testAppServe(pluginName: string, appDir: string) { } } -/** Creates PG databases (drops if exists before) */ -async function createDB(database: string) { +/** Drops PG databases */ +async function dropDB(database: string) { const config = { host: process.env.POSTGRES_HOST, port: process.env.POSTGRES_PORT, @@ -342,7 +342,6 @@ async function createDB(database: string) { } catch (_) { /* do nothing*/ } - return pgtools.createdb(config, database); } /** @@ -350,7 +349,7 @@ async function createDB(database: string) { */ async function testBackendStart(appDir: string, isPostgres: boolean) { if (isPostgres) { - print('Creating DBs'); + print('Dropping old DBs'); await Promise.all( [ 'catalog', @@ -359,7 +358,7 @@ async function testBackendStart(appDir: string, isPostgres: boolean) { 'identity', 'proxy', 'techdocs', - ].map(name => createDB(`backstage_plugin_${name}`)), + ].map(name => dropDB(`backstage_plugin_${name}`)), ); print('Created DBs'); }