mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-04 00:18:01 +01:00
revert: destroy db at test-init
This commit is contained in:
parent
b5184f8fc0
commit
d3fb9f0d09
@ -54,7 +54,7 @@ module.exports = async function init(databaseSchema = 'test', getLogger) {
|
||||
const options = {
|
||||
databaseUrl: require('./database-config').getDatabaseUrl(),
|
||||
databaseSchema,
|
||||
minPool: 0,
|
||||
minPool: 1,
|
||||
maxPool: 1,
|
||||
getLogger,
|
||||
};
|
||||
@ -64,6 +64,7 @@ module.exports = async function init(databaseSchema = 'test', getLogger) {
|
||||
|
||||
await db.raw(`CREATE SCHEMA IF NOT EXISTS ${options.databaseSchema}`);
|
||||
await migrator(options);
|
||||
await db.destroy();
|
||||
const stores = await createStores(options, eventBus);
|
||||
await resetDatabase(stores);
|
||||
await setupDatabase(stores);
|
||||
|
Loading…
Reference in New Issue
Block a user