blob: 2e26a426fc82eeeeab882e65a839dd1142eb3ce2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// Test for invalid sasl auth mechanisms
(function() {
'use strict';
function waitFailedToStart(pid, exitCode) {
assert.soon(function() {
const res = checkProgram(pid);
if (res.alive) {
return false;
}
return res.exitCode == exitCode;
}, `Failed to wait for ${pid} to die with exit code ${exitCode}`, 60 * 1000);
}
const m = MongoRunner.runMongod({
setParameter: "authenticationMechanisms=SCRAM-SHA-1,foo",
waitForConnect: false,
});
waitFailedToStart(m.pid, 2);
})();
|