summaryrefslogtreecommitdiff
path: root/jstests/core/filemd5.js
blob: b43dccf7036d5150fbc05dc3691a7e700618d144 (plain)
1
2
3
4
5
6
7
8
9
10

db.fs.chunks.drop();
db.fs.chunks.insert({files_id: 1, n: 0, data: new BinData(0, "test")});

x = db.runCommand({"filemd5": 1, "root": "fs"});
assert(!x.ok, tojson(x));

db.fs.chunks.ensureIndex({files_id: 1, n: 1});
x = db.runCommand({"filemd5": 1, "root": "fs"});
assert(x.ok, tojson(x));