Skip to content

Commit c72427d

Browse files
committed
fix(MongoMemoryServer): use non-static password for authentication creation
fixes #575
1 parent d153b65 commit c72427d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/mongodb-memory-server-core/src/MongoMemoryServer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ export class MongoMemoryServer extends EventEmitter implements ManagerAdvanced {
670670
this.debug(`createAuth: Creating Root user, name: "${this.auth.customRootName}"`);
671671
await db.command({
672672
createUser: this.auth.customRootName,
673-
pwd: 'rootuser',
673+
pwd: this.auth.customRootPwd,
674674
mechanisms: ['SCRAM-SHA-256'],
675675
customData: {
676676
createdBy: 'mongodb-memory-server',

0 commit comments

Comments
 (0)