diff options
Diffstat (limited to 'jstests/auth/show_log_auth.js')
-rw-r--r-- | jstests/auth/show_log_auth.js | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/jstests/auth/show_log_auth.js b/jstests/auth/show_log_auth.js index be7d17cd7bc..b318e0536ad 100644 --- a/jstests/auth/show_log_auth.js +++ b/jstests/auth/show_log_auth.js @@ -3,21 +3,23 @@ var baseName = "jstests_show_log_auth"; var m = MongoRunner.runMongod({auth: "", bind_ip: "127.0.0.1", nojournal: "", smallfiles: ""}); -var db = m.getDB( "admin" ); +var db = m.getDB("admin"); -db.createUser({user: "admin" , pwd: "pass", roles: jsTest.adminUserRoles}); +db.createUser({user: "admin", pwd: "pass", roles: jsTest.adminUserRoles}); function assertStartsWith(s, prefix) { assert.eq(s.substr(0, prefix.length), prefix); } -assertStartsWith( print.captureAllOutput( function () { +assertStartsWith(print.captureAllOutput(function() { shellHelper.show('logs'); -} ).output[0], 'Error while trying to show logs'); +}).output[0], + 'Error while trying to show logs'); -assertStartsWith( print.captureAllOutput( function () { +assertStartsWith(print.captureAllOutput(function() { shellHelper.show('log ' + baseName); -} ).output[0], 'Error while trying to show ' + baseName + ' log'); +}).output[0], + 'Error while trying to show ' + baseName + ' log'); -db.auth( "admin" , "pass" ); +db.auth("admin", "pass"); db.shutdownServer(); |