diff options
author | clang-format-7.0.1 <adam.martin@10gen.com> | 2019-07-26 18:42:24 -0400 |
---|---|---|
committer | ADAM David Alan Martin <adam.martin@10gen.com> | 2019-07-26 18:42:24 -0400 |
commit | c1a45ebbb0530e3d0201321d725527f1eb83ffce (patch) | |
tree | f523079dc5ded3052eefbdcaae424b7502df5b25 /jstests/noPassthrough/unknown-set-parameter.js | |
parent | c9599d8610c3da0b7c3da65667aff821063cf5b9 (diff) | |
download | mongo-c1a45ebbb0530e3d0201321d725527f1eb83ffce.tar.gz |
Apply formatting per `clang-format-7.0.1`
Diffstat (limited to 'jstests/noPassthrough/unknown-set-parameter.js')
-rw-r--r-- | jstests/noPassthrough/unknown-set-parameter.js | 55 |
1 files changed, 27 insertions, 28 deletions
diff --git a/jstests/noPassthrough/unknown-set-parameter.js b/jstests/noPassthrough/unknown-set-parameter.js index 1e72694e276..f5e6c2b10b8 100644 --- a/jstests/noPassthrough/unknown-set-parameter.js +++ b/jstests/noPassthrough/unknown-set-parameter.js @@ -1,36 +1,35 @@ // Verify error is produced when specifying an invalid set parameter. (function() { - 'use strict'; +'use strict'; - function tryRun(arg) { - // runMongoProgram helpfully makes certain that we pass a port when invoking mongod. - return runMongoProgram('./mongod', '--port', 0, '--setParameter', arg, '--outputConfig'); - } +function tryRun(arg) { + // runMongoProgram helpfully makes certain that we pass a port when invoking mongod. + return runMongoProgram('./mongod', '--port', 0, '--setParameter', arg, '--outputConfig'); +} - // Positive case, valid setparam. - clearRawMongoProgramOutput(); - const valid = tryRun('enableTestCommands=1'); - assert.eq(valid, 0); - const validOutput = rawMongoProgramOutput(); - assert.gte(validOutput.search(/enableTestCommands: 1/), 0, validOutput); +// Positive case, valid setparam. +clearRawMongoProgramOutput(); +const valid = tryRun('enableTestCommands=1'); +assert.eq(valid, 0); +const validOutput = rawMongoProgramOutput(); +assert.gte(validOutput.search(/enableTestCommands: 1/), 0, validOutput); - // Negative case, invalid setparam. - clearRawMongoProgramOutput(); - const foo = tryRun('foo=bar'); - assert.neq(foo, 0); - const fooOutput = rawMongoProgramOutput(); - assert.gte(fooOutput.search(/Unknown --setParameter 'foo'/), 0, fooOutput); - - // Negative case, valid but unavailable setparam. - clearRawMongoProgramOutput(); - const graph = tryRun('roleGraphInvalidationIsFatal=true'); - assert.neq(graph, 0); - const graphOutput = rawMongoProgramOutput(); - assert.gte( - graphOutput.search( - /--setParameter 'roleGraphInvalidationIsFatal' only available when used with 'enableTestCommands'/), - 0, - fooOutput); +// Negative case, invalid setparam. +clearRawMongoProgramOutput(); +const foo = tryRun('foo=bar'); +assert.neq(foo, 0); +const fooOutput = rawMongoProgramOutput(); +assert.gte(fooOutput.search(/Unknown --setParameter 'foo'/), 0, fooOutput); +// Negative case, valid but unavailable setparam. +clearRawMongoProgramOutput(); +const graph = tryRun('roleGraphInvalidationIsFatal=true'); +assert.neq(graph, 0); +const graphOutput = rawMongoProgramOutput(); +assert.gte( + graphOutput.search( + /--setParameter 'roleGraphInvalidationIsFatal' only available when used with 'enableTestCommands'/), + 0, + fooOutput); }()); |