diff options
author | Randolph Tan <randolph@10gen.com> | 2014-10-03 16:46:48 -0400 |
---|---|---|
committer | Randolph Tan <randolph@10gen.com> | 2014-10-06 11:42:59 -0400 |
commit | 5363f0b64b80735f1e17154f21835650fe6ae887 (patch) | |
tree | 762472d5a811dccc8ae7f8cdb36ced1ec17fac07 /jstests/sharding/map_reduce_validation.js | |
parent | 7f8634d97d39615970bc1b31c37c31e7f3e25f27 (diff) | |
download | mongo-5363f0b64b80735f1e17154f21835650fe6ae887.tar.gz |
SERVER-15525 Disallow specifying both inline and sharded in MapReduce out options
Diffstat (limited to 'jstests/sharding/map_reduce_validation.js')
-rw-r--r-- | jstests/sharding/map_reduce_validation.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/jstests/sharding/map_reduce_validation.js b/jstests/sharding/map_reduce_validation.js new file mode 100644 index 00000000000..f85c47f3831 --- /dev/null +++ b/jstests/sharding/map_reduce_validation.js @@ -0,0 +1,13 @@ +var st = new ShardingTest({ shards: 1 }); + +var testDB = st.s.getDB('test'); + +var mapFunc = function() { emit(this.x, 1); }; +var reduceFunc = function(key, values) { return values.length; }; + +assert.commandFailed(testDB.runCommand({ mapReduce: 'user', + map: mapFunc, + reduce: reduceFunc, + out: { inline: 1, sharded: true }})); + +st.stop(); |