diff options
author | Jacob Evans <jacob.evans@10gen.com> | 2019-05-17 16:42:43 -0400 |
---|---|---|
committer | Jacob Evans <jacob.evans@10gen.com> | 2019-05-21 10:55:01 -0400 |
commit | ea0e6b047c98fd56118431d036ee686be0720226 (patch) | |
tree | 6ccd1c8b8b8631b63cc3f4c4453fa397958d8fa6 /jstests/auth | |
parent | f09fa890550e6da02656fbb2df33837bf2bdad50 (diff) | |
download | mongo-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.js | 20 |
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, }; |