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

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) )