From ab390dbaabe5a32b6a396552b244a854bb4e4edc Mon Sep 17 00:00:00 2001 From: Mateusz Kwasniewski Date: Mon, 23 Oct 2023 17:14:41 +0200 Subject: [PATCH] test: silent migration test (#5131) --- src/test/e2e/migrator.e2e.test.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/test/e2e/migrator.e2e.test.ts b/src/test/e2e/migrator.e2e.test.ts index 9e7d6d2751..297b4870f0 100644 --- a/src/test/e2e/migrator.e2e.test.ts +++ b/src/test/e2e/migrator.e2e.test.ts @@ -1,9 +1,12 @@ import { getDbConfig } from './helpers/database-config'; import { createTestConfig } from '../config/test-config'; import { getInstance } from 'db-migrate'; +import { log } from 'db-migrate-shared'; import { Client } from 'pg'; import { IDBOption } from 'lib/types'; +log.setLogLevel('error'); + async function initSchema(db: IDBOption): Promise { const client = new Client(db); await client.connect(); @@ -30,6 +33,8 @@ test('Up & down migrations work', async () => { connectionTimeoutMillis: 2000, }; + // 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}/../../`, // relative to src/test/e2e config: { e2e },