summaryrefslogtreecommitdiff
path: root/jstests/auth
diff options
context:
space:
mode:
authorJacob Evans <jacob.evans@10gen.com>2019-05-17 16:42:43 -0400
committerJacob Evans <jacob.evans@10gen.com>2019-05-21 10:55:01 -0400
commitea0e6b047c98fd56118431d036ee686be0720226 (patch)
tree6ccd1c8b8b8631b63cc3f4c4453fa397958d8fa6 /jstests/auth
parentf09fa890550e6da02656fbb2df33837bf2bdad50 (diff)
downloadmongo-ea0e6b047c98fd56118431d036ee686be0720226.tar.gz
SERVER-41200 Change syntax from $out to $merge for tests in other directories
Diffstat (limited to 'jstests/auth')
-rw-r--r--jstests/auth/lib/commands_lib.js20
1 files changed, 16 insertions, 4 deletions
diff --git a/jstests/auth/lib/commands_lib.js b/jstests/auth/lib/commands_lib.js
index 2580ebe6635..86b560718c7 100644
--- a/jstests/auth/lib/commands_lib.js
+++ b/jstests/auth/lib/commands_lib.js
@@ -1113,11 +1113,17 @@ var authCommandsLib = {
]
},
{
- testname: "aggregate_out_insert_documents",
+ testname: "aggregate_merge_insert_documents",
command: function(state, args) {
return {
aggregate: "foo",
- pipeline: [{$out: {db: args.targetDB, to: "foo_out", mode: "insertDocuments"}}],
+ pipeline: [{
+ $merge: {
+ into: {db: args.targetDB, coll: "foo_out"},
+ whenMatched: "fail",
+ whenNotMatched: "insert"
+ }
+ }],
cursor: {},
bypassDocumentValidation: args.bypassDocumentValidation,
};
@@ -1181,11 +1187,17 @@ var authCommandsLib = {
]
},
{
- testname: "aggregate_out_replace_documents",
+ testname: "aggregate_merge_replace_documents",
command: function(state, args) {
return {
aggregate: "foo",
- pipeline: [{$out: {db: args.targetDB, to: "foo_out", mode: "replaceDocuments"}}],
+ pipeline: [{
+ $merge: {
+ into: {db: args.targetDB, coll: "foo_out"},
+ whenMatched: "replaceWithNew",
+ whenNotMatched: "insert"
+ }
+ }],
cursor: {},
bypassDocumentValidation: args.bypassDocumentValidation,
};