mirror of
https://github.com/Unleash/unleash.git
synced 2025-08-04 13:48:56 +02: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 ClientMetricsStore = require('./client-metrics-store');
|
||||||
const ClientApplicationsStore = require('./client-applications-store');
|
const ClientApplicationsStore = require('./client-applications-store');
|
||||||
|
|
||||||
module.exports.createStores = (config, eventBus, dbPool) => {
|
module.exports.createStores = (config, eventBus) => {
|
||||||
const getLogger = config.getLogger;
|
const getLogger = config.getLogger;
|
||||||
const db = dbPool || createDb(config);
|
const db = createDb(config);
|
||||||
const eventStore = new EventStore(db, getLogger);
|
const eventStore = new EventStore(db, getLogger);
|
||||||
const clientMetricsDb = new ClientMetricsDb(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 db.raw(`CREATE SCHEMA IF NOT EXISTS ${options.databaseSchema}`);
|
||||||
await migrator(options);
|
await migrator(options);
|
||||||
// await db.destroy();
|
await db.destroy();
|
||||||
const stores = await createStores(options, eventBus, db);
|
const stores = await createStores(options, eventBus);
|
||||||
await resetDatabase(stores);
|
await resetDatabase(stores);
|
||||||
await setupDatabase(stores);
|
await setupDatabase(stores);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user