mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-19 00:15:43 +01:00
Revert "debug: test not destroying db in test-setup"
This reverts commit 9fe70f84dc
.
This commit is contained in:
parent
96d5413b70
commit
704c3afc15
@ -9,9 +9,9 @@ const ClientMetricsDb = require('./client-metrics-db');
|
||||
const ClientMetricsStore = require('./client-metrics-store');
|
||||
const ClientApplicationsStore = require('./client-applications-store');
|
||||
|
||||
module.exports.createStores = (config, eventBus, dbPool) => {
|
||||
module.exports.createStores = (config, eventBus) => {
|
||||
const getLogger = config.getLogger;
|
||||
const db = dbPool || createDb(config);
|
||||
const db = createDb(config);
|
||||
const eventStore = new EventStore(db, getLogger);
|
||||
const clientMetricsDb = new ClientMetricsDb(db, getLogger);
|
||||
|
||||
|
@ -64,8 +64,8 @@ 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, db);
|
||||
await db.destroy();
|
||||
const stores = await createStores(options, eventBus);
|
||||
await resetDatabase(stores);
|
||||
await setupDatabase(stores);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user