blob: ced10a08d0428c4a47814146165ab0874caf78df (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
/**
* Tests that normal startup writes to the log files as expected.
*/
(function() {
'use strict';
function makeRegExMatchFn(pattern) {
return function(text) {
return pattern.test(text);
};
}
function testStartupLogging(launcher, matchFn, expectedExitCode) {
assert(matchFn(rawMongoProgramOutput()));
}
function validateWaitingMessage(launcher) {
clearRawMongoProgramOutput();
var conn = launcher.start({});
launcher.stop(conn, undefined, {});
testStartupLogging(launcher, makeRegExMatchFn(/waiting for connections on port/));
}
print("********************\nTesting startup logging in mongod\n********************");
validateWaitingMessage({
start: function(opts) {
return MongoRunner.runMongod(opts);
},
stop: MongoRunner.stopMongod
});
}());
|