summaryrefslogtreecommitdiff
path: root/jstests/aggregation
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2013-07-25 15:00:52 -0400
committerMathias Stearn <mathias@10gen.com>2013-08-08 16:11:35 -0400
commitb51d448db276dba21766bd733b2dbab60f6789e0 (patch)
treed7d26b31793e7a52faec86ed88aa3139a5c6ffcf /jstests/aggregation
parent8e93f578191525c7dd96d3e5ab85c66b4802df55 (diff)
downloadmongo-b51d448db276dba21766bd733b2dbab60f6789e0.tar.gz
SERVER-10097 sharded $out
Note that all sharded aggregation tests now go through the "merge-on-mongod" codepath now rather than the "merge-in-mongos" codepath.
Diffstat (limited to 'jstests/aggregation')
-rw-r--r--jstests/aggregation/testshard1.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/jstests/aggregation/testshard1.js b/jstests/aggregation/testshard1.js
index 8356015fd71..f069cd9f9a2 100644
--- a/jstests/aggregation/testshard1.js
+++ b/jstests/aggregation/testshard1.js
@@ -183,6 +183,13 @@ testSortLimit(10, -1);
testSortLimit(100, 1);
testSortLimit(100, -1);
+// test $out by copying source collection verbatim to output
+var outCollection = db.ts1_out;
+var res = db.ts1.aggregate({$out: outCollection.getName()});
+assert.eq(res, {result: [], outputNs: outCollection.getFullName(), ok: 1});
+assert.eq(db.ts1.find().itcount(), outCollection.find().itcount());
+assert.eq(db.ts1.find().sort({_id:1}).toArray(),
+ outCollection.find().sort({_id:1}).toArray());
// shut everything down
shardedAggTest.stop();