From e85e001ddc58bf2df0345cf8b46d5a458a5b51b7 Mon Sep 17 00:00:00 2001 From: paulo-ocean Date: Thu, 25 Jul 2024 12:34:25 +0100 Subject: [PATCH] clear debug messages, restore deleted line accidentally --- src/test/unit/logging.test.ts | 6 +----- src/test/utils/hooks.ts | 1 + 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/test/unit/logging.test.ts b/src/test/unit/logging.test.ts index 11209145b..329923362 100644 --- a/src/test/unit/logging.test.ts +++ b/src/test/unit/logging.test.ts @@ -54,15 +54,11 @@ describe('Logger instances and transports tests', async () => { null, buildEnvOverrideConfig([ENVIRONMENT_VARIABLES.LOG_DB], ['true']) ) - console.log('env after', envAfter) expect(USE_DB_TRANSPORT()).to.be.equal(true) // will build the DB transport layer - console.log('before config') const config = await getConfiguration(true) - console.log('after config: ', config) // eslint-disable-next-line no-unused-vars const DB = await new Database(config.dbConfig) - console.log('after DB') // Could generate Typesene error if DB is not running, but does not matter for this test OCEAN_NODE_LOGGER.logMessage('Should build DB transport layer') @@ -77,7 +73,7 @@ describe('Logger instances and transports tests', async () => { OCEAN_NODE_LOGGER.removeTransport(transports[0]) expect(OCEAN_NODE_LOGGER.hasDBTransport()).to.be.equal(false) await tearDownEnvironment(envAfter) - expect(process.env.LOG_DB).to.be.equal('false') + expect(USE_DB_TRANSPORT()).to.be.equal(false) }) after(() => { diff --git a/src/test/utils/hooks.ts b/src/test/utils/hooks.ts index 1546947d9..59ace1d4b 100644 --- a/src/test/utils/hooks.ts +++ b/src/test/utils/hooks.ts @@ -72,6 +72,7 @@ export const mochaHooks = { CONFIG_LOGGER.debug( `(Hook) Restoring environment variable: ${varName} \ncurrent:\n ${process.env[varName]} \noriginal:\n ${initialVariable.originalValue}` ) + process.env[varName] = initialVariable.originalValue } }) }