summaryrefslogtreecommitdiff
path: root/jstests/mmap_v1
diff options
context:
space:
mode:
authorDan Pasette <dan@10gen.com>2014-11-25 17:14:23 -0500
committerDan Pasette <dan@mongodb.com>2014-11-25 17:38:26 -0500
commit68f1a779e1a3063ef04f07be460d370e7fd82a93 (patch)
treef8fb16362891634d275ef16f26b5952b22d91750 /jstests/mmap_v1
parenta4d077c775d8322c9e59313c3618fe73ac85e925 (diff)
downloadmongo-68f1a779e1a3063ef04f07be460d370e7fd82a93.tar.gz
SERVER-16114 touch cmd returns an error when storage engine does not support it
Diffstat (limited to 'jstests/mmap_v1')
-rw-r--r--jstests/mmap_v1/touch1.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/jstests/mmap_v1/touch1.js b/jstests/mmap_v1/touch1.js
new file mode 100644
index 00000000000..8de16c7131d
--- /dev/null
+++ b/jstests/mmap_v1/touch1.js
@@ -0,0 +1,13 @@
+
+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 ) );