diff options
author | Adam Midvidy <amidvidy@gmail.com> | 2016-02-04 15:00:39 -0500 |
---|---|---|
committer | Adam Midvidy <amidvidy@gmail.com> | 2016-02-17 16:20:26 -0500 |
commit | 6eb7010239c83e3d338d02175db6b82627e03964 (patch) | |
tree | bc4b561485adb8e3ee29da6dbc495455efea4bab /jstests/noPassthrough/read_only_command_line.js | |
parent | f5fd9b3328cfa07c6a5d4f296bbaf6c3d0c3946b (diff) | |
download | mongo-6eb7010239c83e3d338d02175db6b82627e03964.tar.gz |
SERVER-22352 do not fail startup if lockFile cannot be created in readOnly mode
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); |