From 8fdb263d64c7d8585d8bea3873dcde279db6a099 Mon Sep 17 00:00:00 2001 From: Mateusz Kwasniewski Date: Mon, 13 Mar 2023 10:12:43 +0100 Subject: [PATCH] feat: disable verbosity from db-migrate (#3301) --- src/migrator.ts | 2 ++ src/test/e2e/api/admin/user/pat.e2e.test.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/migrator.ts b/src/migrator.ts index 694759b8b8..19350a02a6 100644 --- a/src/migrator.ts +++ b/src/migrator.ts @@ -11,6 +11,8 @@ export async function migrateDb({ db }: IUnleashConfig): Promise { connectionTimeoutMillis: secondsToMilliseconds(10), }; + // disable Intellij/WebStorm from setting verbose CLI argument to db-migrator + process.argv = process.argv.filter((it) => !it.includes('--verbose')); const dbm = getInstance(true, { cwd: __dirname, config: { custom }, diff --git a/src/test/e2e/api/admin/user/pat.e2e.test.ts b/src/test/e2e/api/admin/user/pat.e2e.test.ts index e21402c322..129fb76627 100644 --- a/src/test/e2e/api/admin/user/pat.e2e.test.ts +++ b/src/test/e2e/api/admin/user/pat.e2e.test.ts @@ -15,6 +15,7 @@ let firstId; tomorrow.setDate(tomorrow.getDate() + 1); beforeAll(async () => { + getLogger.setMuteError(true); db = await dbInit('user_pat', getLogger); patStore = db.stores.patStore; app = await setupAppWithAuth(db.stores); @@ -28,6 +29,7 @@ beforeAll(async () => { }); afterAll(async () => { + getLogger.setMuteError(false); await app.destroy(); });