summaryrefslogtreecommitdiff
path: root/jstests/core/index_create_too_many.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/index_create_too_many.js
parenta025d43f3ce2efc1fb1282a718f5d286fa0a4dc1 (diff)
downloadmongo-4ae691e8edc87d0e3cfb633bb91c328426be007b.tar.gz
SERVER-22468 Format JS code with approved style in jstests/
Diffstat (limited to 'jstests/core/index_create_too_many.js')
-rw-r--r--jstests/core/index_create_too_many.js13
1 files changed, 6 insertions, 7 deletions
diff --git a/jstests/core/index_create_too_many.js b/jstests/core/index_create_too_many.js
index add81a86703..44d5016a7cf 100644
--- a/jstests/core/index_create_too_many.js
+++ b/jstests/core/index_create_too_many.js
@@ -6,7 +6,10 @@ coll.drop();
// create 62 indexes, which leaves us with 63 indexes total (+1 for the _id index)
for (var i = 0; i < 62; i++) {
var name = 'i' + i;
- var spec = {key: {}, name: name};
+ var spec = {
+ key: {},
+ name: name
+ };
spec.key[name] = 1;
var res = coll.runCommand('createIndexes', {indexes: [spec]});
@@ -14,12 +17,8 @@ for (var i = 0; i < 62; i++) {
}
// attempt to add 2 more indexes to push over the limit (64).
-var newSpecs = [
- {key: {i62: 1 }, name: 'i62'},
- {key: {i63: 1 }, name: 'i63'}
-];
+var newSpecs = [{key: {i62: 1}, name: 'i62'}, {key: {i63: 1}, name: 'i63'}];
var res = coll.runCommand('createIndexes', {indexes: newSpecs});
assert.commandFailed(res, tojson(res));
-assert.eq(res.code, 67); // CannotCreateIndex
-
+assert.eq(res.code, 67); // CannotCreateIndex