Files
mongo/jstests/core/filemd5.js
Randolph Tan 5595b94560 SERVER-12127 migrate js tests to jscore suite when not related to writes
Moved test jstest/[a-i].js -> jstests/core/ and made changes to comply with write command api
2014-02-28 16:26:33 -05:00

12 lines
292 B
JavaScript

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