0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00
mongodb/jstests/mmap_v1/touch1.js

14 lines
297 B
JavaScript

t = db.touch1;
t.drop();
t.insert( { x : 1 } );
t.ensureIndex( { x : 1 } );
res = t.runCommand( "touch" );
assert( !res.ok, tojson( res ) );
res = t.runCommand( "touch", { data : true, index : true } );
assert.eq( 1, res.data.numRanges, tojson( res ) );
assert.eq( 1, res.ok, tojson( res ) );