File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
packages/mongodb-memory-server-core/src Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -708,11 +708,12 @@ export class MongoMemoryReplSet extends EventEmitter implements ManagerAdvanced
708708 log ( '_initReplSet: trying "replSetInitiate"' ) ;
709709 await adminDb . command ( { replSetInitiate : rsConfig } ) ;
710710
711- if ( typeof this . _replSetOpts . auth === 'object' ) {
712- log ( '_initReplSet: "this._replSetOpts.auth" is a object ' ) ;
711+ if ( this . enableAuth ( ) ) {
712+ log ( '_initReplSet: "enableAuth" returned "true" ' ) ;
713713
714714 await this . _waitForPrimary ( undefined , '_initReplSet authIsObject' ) ;
715715
716+ // find the primary instance to run createAuth on
716717 const primary = this . servers . find (
717718 ( server ) => server . instanceInfo ?. instance . isInstancePrimary
718719 ) ;
You can’t perform that action at this time.
0 commit comments