Skip to content

Commit d1f73ed

Browse files
StefanoDeVuononodkz
authored andcommitted
fix: add auth to the command line arguments
1 parent 1b9e617 commit d1f73ed

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/util/MongoInstance.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ export default class MongodbInstance {
7777
if (storageEngine) result.push('--storageEngine', storageEngine);
7878
if (dbPath) result.push('--dbpath', dbPath);
7979
if (!auth) result.push('--noauth');
80+
else if (auth) result.push('--auth');
8081
if (replSet) result.push('--replSet', replSet);
8182

8283
return result.concat(args || []);

src/util/__tests__/MongoInstance-test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ describe('MongoInstance', () => {
7373
'27555',
7474
'--dbpath',
7575
'/data',
76+
'--auth',
7677
]);
7778
});
7879

0 commit comments

Comments
 (0)