diff options
Diffstat (limited to 'jstests/noPassthrough/read_only_command_line.js')
-rw-r--r-- | jstests/noPassthrough/read_only_command_line.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/jstests/noPassthrough/read_only_command_line.js b/jstests/noPassthrough/read_only_command_line.js index fcd12c2a3eb..cbbe2f56a6a 100644 --- a/jstests/noPassthrough/read_only_command_line.js +++ b/jstests/noPassthrough/read_only_command_line.js @@ -5,6 +5,7 @@ // TODO: use configured storageEngine from testData once wiredTiger supports readOnly mode. var mongod = MongoRunner.runMongod({storageEngine: "mmapv1"}); + var dbpath = mongod.dbpath; // ensure dbpath gets set up. assert.writeOK(mongod.getDB("foo").x.insert({x:1})); @@ -13,7 +14,7 @@ assert(!mongod.getDB("admin").serverStatus().storageEngine.readOnly); MongoRunner.stopMongod(mongod); - mongod = MongoRunner.runMongod({storageEngine: "mmapv1", readOnly: ""}); + mongod = MongoRunner.runMongod({storageEngine: "mmapv1", readOnly: "", dbpath: dbpath, noCleanData: true}); assert(mongod.getDB("admin").isMaster().readOnly); assert(mongod.getDB("admin").serverStatus().storageEngine.readOnly); MongoRunner.stopMongod(mongod); |