Skip to content

Commit

Permalink
feat(MongoInstance): add value "isReplSet"
Browse files Browse the repository at this point in the history
  • Loading branch information
hasezoey committed Oct 12, 2020
1 parent c2311cb commit 3ba31e2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/mongodb-memory-server-core/src/util/MongoInstance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ export class MongoInstance extends EventEmitter {
* This boolean is "true" if the instance is successfully started
*/
isInstanceReady: boolean = false;
/**
* This boolean is "true" if the instance is part of an replset
*/
isReplSet: boolean = false;

constructor(opts: Partial<MongodOpts>) {
super();
Expand Down Expand Up @@ -154,6 +158,7 @@ export class MongoInstance extends EventEmitter {
result.push('--noauth');
}
if (!!this.instanceOpts.replSet) {
this.isReplSet = true;
result.push('--replSet', this.instanceOpts.replSet);
}

Expand Down

0 comments on commit 3ba31e2

Please sign in to comment.