mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
14 lines
297 B
JavaScript
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 ) );
|