diff options
Diffstat (limited to 'jstests/mmap_v1/drop.js')
-rw-r--r-- | jstests/mmap_v1/drop.js | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/jstests/mmap_v1/drop.js b/jstests/mmap_v1/drop.js index 154c35d1db3..efb50a3bd08 100644 --- a/jstests/mmap_v1/drop.js +++ b/jstests/mmap_v1/drop.js @@ -3,22 +3,21 @@ var coll = db.jstests_drop; coll.drop(); res = coll.runCommand("drop"); -assert( !res.ok, tojson( res ) ); +assert(!res.ok, tojson(res)); - -assert.eq(0, db.system.indexes.find({ns : coll + ""}).count(), "A"); +assert.eq(0, db.system.indexes.find({ns: coll + ""}).count(), "A"); coll.save({}); -assert.eq(1, db.system.indexes.find({ns : coll + ""}).count(), "B"); -coll.ensureIndex({a : 1}); -assert.eq(2, db.system.indexes.find({ns : coll + ""}).count(), "C"); -assert.commandWorked(db.runCommand({drop : coll.getName()})); -assert.eq(0, db.system.indexes.find({ns : coll + ""}).count(), "D"); +assert.eq(1, db.system.indexes.find({ns: coll + ""}).count(), "B"); +coll.ensureIndex({a: 1}); +assert.eq(2, db.system.indexes.find({ns: coll + ""}).count(), "C"); +assert.commandWorked(db.runCommand({drop: coll.getName()})); +assert.eq(0, db.system.indexes.find({ns: coll + ""}).count(), "D"); -coll.ensureIndex({a : 1}); -assert.eq(2, db.system.indexes.find({ns : coll + ""}).count(), "E"); -assert.commandWorked(db.runCommand({deleteIndexes : coll.getName(), index : "*"}), +coll.ensureIndex({a: 1}); +assert.eq(2, db.system.indexes.find({ns: coll + ""}).count(), "E"); +assert.commandWorked(db.runCommand({deleteIndexes: coll.getName(), index: "*"}), "delete indexes A"); -assert.eq(1, db.system.indexes.find({ns : coll + ""}).count(), "G"); +assert.eq(1, db.system.indexes.find({ns: coll + ""}).count(), "G"); // make sure we can still use it coll.save({}); |