| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
data: |
| 6 |
- {_id: 1, x: 11} |
| 7 |
- {_id: 2, x: 22} |
| 8 |
collection_name: &collection_name default_write_concern_coll |
| 9 |
database_name: &database_name default_write_concern_db |
| 10 |
|
| 11 |
runOn: |
| 12 |
- minServerVersion: "4.2" |
| 13 |
|
| 14 |
tests: |
| 15 |
- description: Aggregate with $merge omits default write concern |
| 16 |
operations: |
| 17 |
- object: collection |
| 18 |
databaseOptions: {writeConcern: {}} |
| 19 |
collectionOptions: {writeConcern: {}} |
| 20 |
name: aggregate |
| 21 |
arguments: |
| 22 |
pipeline: &merge_pipeline |
| 23 |
- $match: {_id: {$gt: 1}} |
| 24 |
- $merge: {into: &other_collection_name "other_collection_name" } |
| 25 |
expectations: |
| 26 |
- command_started_event: |
| 27 |
command: |
| 28 |
aggregate: *collection_name |
| 29 |
pipeline: *merge_pipeline |
| 30 |
|
| 31 |
writeConcern: null |
| 32 |
outcome: |
| 33 |
collection: |
| 34 |
name: *other_collection_name |
| 35 |
data: |
| 36 |
- {_id: 2, x: 22} |