Skip to content

Commit 14e1a12

Browse files
committed
fix(tests): unset MONGOSH_TEST_ONLY_MAX_LOG_FILE_COUNT before running tests
1 parent a265439 commit 14e1a12

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/cli-repl/src/cli-repl.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1462,6 +1462,9 @@ describe('CliRepl', function () {
14621462
it('can set log max file count', async function () {
14631463
const testMaxFileCount = 123;
14641464
cliRepl.config.logMaxFileCount = testMaxFileCount;
1465+
const oldEnvironmentLimit =
1466+
process.env.MONGOSH_TEST_ONLY_MAX_LOG_FILE_COUNT;
1467+
delete process.env.MONGOSH_TEST_ONLY_MAX_LOG_FILE_COUNT;
14651468
await cliRepl.start(await testServer.connectionString(), {});
14661469

14671470
expect(await cliRepl.getConfig('logMaxFileCount')).equals(
@@ -1470,6 +1473,9 @@ describe('CliRepl', function () {
14701473
expect(cliRepl.logManager?._options.maxLogFileCount).equals(
14711474
testMaxFileCount
14721475
);
1476+
1477+
process.env.MONGOSH_TEST_ONLY_MAX_LOG_FILE_COUNT =
1478+
oldEnvironmentLimit;
14731479
});
14741480
});
14751481

0 commit comments

Comments
 (0)