Skip to content

Commit

Permalink
fix(tests): use a promise for getting config
Browse files Browse the repository at this point in the history
  • Loading branch information
gagik committed Feb 7, 2025
1 parent 141ae65 commit 90dbd8f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/cli-repl/src/cli-repl.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1450,7 +1450,7 @@ describe('CliRepl', function () {
cliRepl.config.logRetentionDays = testRetentionDays;
await cliRepl.start(await testServer.connectionString(), {});

expect(cliRepl.getConfig('logRetentionDays')).equals(
expect(await cliRepl.getConfig('logRetentionDays')).equals(
testRetentionDays
);
expect(cliRepl.logManager?._options.retentionDays).equals(
Expand Down
4 changes: 3 additions & 1 deletion packages/e2e-tests/test/e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1722,7 +1722,9 @@ describe('e2e', function () {
const globalConfig = path.join(homedir, 'globalconfig.conf');
await fs.writeFile(
globalConfig,
`mongosh:\n logLocation: "${customLogDir.path}"\n logRetentionDays: ${retentionDays}`
`mongosh:\n logLocation: ${JSON.stringify(
customLogDir.path
)}\n logRetentionDays: ${retentionDays}`
);

expect(await getFilesState(paths)).equals('1111111111');
Expand Down

0 comments on commit 90dbd8f

Please sign in to comment.