summaryrefslogtreecommitdiff
path: root/jstests/core/getlog1.js
diff options
context:
space:
mode:
authorJonathan Abrahams <jonathan@mongodb.com>2016-03-09 12:17:50 -0500
committerJonathan Abrahams <jonathan@mongodb.com>2016-03-09 12:18:14 -0500
commit4ae691e8edc87d0e3cfb633bb91c328426be007b (patch)
tree52079a593f54382ca13a2e741633eab1b6271893 /jstests/core/getlog1.js
parenta025d43f3ce2efc1fb1282a718f5d286fa0a4dc1 (diff)
downloadmongo-4ae691e8edc87d0e3cfb633bb91c328426be007b.tar.gz
SERVER-22468 Format JS code with approved style in jstests/
Diffstat (limited to 'jstests/core/getlog1.js')
-rw-r--r--jstests/core/getlog1.js26
1 files changed, 13 insertions, 13 deletions
diff --git a/jstests/core/getlog1.js b/jstests/core/getlog1.js
index cf59b8f8318..d19ba7cdde8 100644
--- a/jstests/core/getlog1.js
+++ b/jstests/core/getlog1.js
@@ -1,7 +1,7 @@
-// to run:
+// to run:
// ./mongo jstests/<this-file>
-contains = function(arr,obj) {
+contains = function(arr, obj) {
var i = arr.length;
while (i--) {
if (arr[i] === obj) {
@@ -11,17 +11,17 @@ contains = function(arr,obj) {
return false;
};
-var resp = db.adminCommand({getLog:"*"});
-assert( resp.ok == 1, "error executing getLog command" );
-assert( resp.names, "no names field" );
-assert( resp.names.length > 0, "names array is empty" );
-assert( contains(resp.names,"global") , "missing global category" );
-assert( !contains(resp.names,"butty") , "missing butty category" );
+var resp = db.adminCommand({getLog: "*"});
+assert(resp.ok == 1, "error executing getLog command");
+assert(resp.names, "no names field");
+assert(resp.names.length > 0, "names array is empty");
+assert(contains(resp.names, "global"), "missing global category");
+assert(!contains(resp.names, "butty"), "missing butty category");
-resp = db.adminCommand({getLog:"global"});
-assert( resp.ok == 1, "error executing getLog command" );
-assert( resp.log, "no log field" );
-assert( resp.log.length > 0 , "no log lines" );
+resp = db.adminCommand({getLog: "global"});
+assert(resp.ok == 1, "error executing getLog command");
+assert(resp.log, "no log field");
+assert(resp.log.length > 0, "no log lines");
// getLog value must be a string
-assert.commandFailed(db.adminCommand({ getLog: 21 }));
+assert.commandFailed(db.adminCommand({getLog: 21}));