diff options
Diffstat (limited to 'src/mongo')
-rwxr-xr-x | src/mongo/shell/servers.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/shell/servers.js b/src/mongo/shell/servers.js index 3192412f51f..47883c2649b 100755 --- a/src/mongo/shell/servers.js +++ b/src/mongo/shell/servers.js @@ -674,6 +674,14 @@ startMongos = function(args){ MongoRunner.startWithArgs = function(argArray, waitForConnect) { var port = _parsePort.apply(null, argArray); + + // Enable test commands. + // TODO: Make there only be one codepath for starting mongo processes + var programName = argArray[0]; + if (jsTest.options().enableTestCommands && (programName.endsWith('mongod') || programName.endsWith('mongos'))) { + argArray.push.apply(argArray, ['--setParameter', 'enableTestCommands=1']); + } + var pid = _startMongoProgram.apply(null, argArray); var conn = null; |