summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough/devnull.js
blob: 103b49f4b5691dea9046f813d9c8eb5326b780c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
(function() {
const emrcFalseConn =
    MongoRunner.runMongod({storageEngine: "devnull", enableMajorityReadConcern: false});
assert(!emrcFalseConn);
var logContents = rawMongoProgramOutput();
assert(logContents.indexOf("enableMajorityReadConcern:false is no longer supported") > 0);

// Even though enableMajorityReadConcern: true is the default, the server internally changes
// this value to false when running with the devnull storage engine.
const emrcDefaultConn = MongoRunner.runMongod({storageEngine: "devnull"});
db = emrcDefaultConn.getDB("test");

let res = db.foo.insert({x: 1});
assert.eq(1, res.nInserted, tojson(res));

// Skip collection validation during stopMongod if invalid storage engine.
TestData.skipCollectionAndIndexValidation = true;

MongoRunner.stopMongod(emrcDefaultConn);
}());