summaryrefslogtreecommitdiff
path: root/jstests/core/capped_queries_and_id_index.js
diff options
context:
space:
mode:
authorclang-format-7.0.1 <adam.martin@10gen.com>2019-07-26 18:20:35 -0400
committerADAM David Alan Martin <adam.martin@10gen.com>2019-07-27 11:02:23 -0400
commit134a4083953270e8a11430395357fb70a29047ad (patch)
treedd428e1230e31d92b20b393dfdc17ffe7fa79cb6 /jstests/core/capped_queries_and_id_index.js
parent1e46b5049003f427047e723ea5fab15b5a9253ca (diff)
downloadmongo-134a4083953270e8a11430395357fb70a29047ad.tar.gz
SERVER-41772 Apply clang-format 7.0.1 to the codebase
Diffstat (limited to 'jstests/core/capped_queries_and_id_index.js')
-rw-r--r--jstests/core/capped_queries_and_id_index.js30
1 files changed, 15 insertions, 15 deletions
diff --git a/jstests/core/capped_queries_and_id_index.js b/jstests/core/capped_queries_and_id_index.js
index a10a4f60daf..1bf463f05ed 100644
--- a/jstests/core/capped_queries_and_id_index.js
+++ b/jstests/core/capped_queries_and_id_index.js
@@ -1,24 +1,24 @@
// Tests the behavior of querying or updating a capped collection with and without an _id index.
// @tags: [requires_capped]
(function() {
- "use strict";
- const coll = db.capped9;
- coll.drop();
+"use strict";
+const coll = db.capped9;
+coll.drop();
- assert.commandWorked(db.createCollection("capped9", {capped: true, size: 1024 * 50}));
+assert.commandWorked(db.createCollection("capped9", {capped: true, size: 1024 * 50}));
- assert.writeOK(coll.insert({_id: 1, x: 2, y: 3}));
+assert.writeOK(coll.insert({_id: 1, x: 2, y: 3}));
- assert.eq(1, coll.find({x: 2}).itcount());
- assert.eq(1, coll.find({y: 3}).itcount());
+assert.eq(1, coll.find({x: 2}).itcount());
+assert.eq(1, coll.find({y: 3}).itcount());
- // SERVER-3064 proposes making the following queries/updates by _id result in an error.
- assert.eq(1, coll.find({_id: 1}).itcount());
- assert.writeOK(coll.update({_id: 1}, {$set: {y: 4}}));
- assert.eq(4, coll.findOne().y);
+// SERVER-3064 proposes making the following queries/updates by _id result in an error.
+assert.eq(1, coll.find({_id: 1}).itcount());
+assert.writeOK(coll.update({_id: 1}, {$set: {y: 4}}));
+assert.eq(4, coll.findOne().y);
- assert.commandWorked(coll.createIndex({_id: 1}));
- assert.eq(1, coll.find({_id: 1}).itcount());
- assert.writeOK(coll.update({_id: 1}, {$set: {y: 5}}));
- assert.eq(5, coll.findOne().y);
+assert.commandWorked(coll.createIndex({_id: 1}));
+assert.eq(1, coll.find({_id: 1}).itcount());
+assert.writeOK(coll.update({_id: 1}, {$set: {y: 5}}));
+assert.eq(5, coll.findOne().y);
}());