...
1# This file was created automatically using mongodb-spec-converter.
2# Please review the generated file, then remove this notice.
3
4description: aggregate-merge
5schemaVersion: '1.0'
6runOnRequirements:
7 -
8 minServerVersion: 4.1.11
9createEntities:
10 -
11 client:
12 id: &client0 client0
13 observeEvents:
14 - commandStartedEvent
15 -
16 database:
17 id: &database0 database0
18 client: client0
19 databaseName: &database_name crud-v2
20 -
21 collection:
22 id: &collection0 collection0
23 database: database0
24 collectionName: &collection_name test_aggregate_merge
25 -
26 collection:
27 id: &collection_readConcern_majority collection_readConcern_majority
28 database: database0
29 collectionName: *collection_name
30 collectionOptions:
31 readConcern: { level: "majority" }
32 -
33 collection:
34 id: &collection_readConcern_local collection_readConcern_local
35 database: database0
36 collectionName: *collection_name
37 collectionOptions:
38 readConcern: { level: "local" }
39 -
40 collection:
41 id: &collection_readConcern_available collection_readConcern_available
42 database: database0
43 collectionName: *collection_name
44 collectionOptions:
45 readConcern: { level: "available" }
46initialData:
47 -
48 collectionName: *collection_name
49 databaseName: *database_name
50 documents:
51 -
52 _id: 1
53 x: 11
54 -
55 _id: 2
56 x: 22
57 -
58 _id: 3
59 x: 33
60tests:
61 -
62 description: 'Aggregate with $merge'
63 operations:
64 -
65 object: *collection0
66 name: aggregate
67 arguments: &arguments
68 pipeline: &pipeline
69 -
70 $sort:
71 x: 1
72 -
73 $match:
74 _id:
75 $gt: 1
76 -
77 $merge:
78 into: &output_collection other_test_collection
79 expectEvents:
80 -
81 client: *client0
82 events:
83 -
84 commandStartedEvent:
85 command:
86 aggregate: *collection_name
87 pipeline: *pipeline
88 outcome: &outcome
89 -
90 collectionName: *output_collection
91 databaseName: *database_name
92 documents:
93 -
94 _id: 2
95 x: 22
96 -
97 _id: 3
98 x: 33
99 -
100 description: 'Aggregate with $merge and batch size of 0'
101 operations:
102 -
103 object: *collection0
104 name: aggregate
105 arguments:
106 pipeline: &pipeline
107 -
108 $sort:
109 x: 1
110 -
111 $match:
112 _id:
113 $gt: 1
114 -
115 $merge:
116 into: &output_collection other_test_collection
117 batchSize: 0
118 expectEvents:
119 -
120 client: *client0
121 events:
122 -
123 commandStartedEvent:
124 command:
125 aggregate: *collection_name
126 pipeline: *pipeline
127 cursor: { }
128 outcome: *outcome
129 -
130 description: 'Aggregate with $merge and majority readConcern'
131 operations:
132 -
133 object: *collection_readConcern_majority
134 name: aggregate
135 arguments: *arguments
136 expectEvents:
137 -
138 client: *client0
139 events:
140 -
141 commandStartedEvent:
142 command:
143 aggregate: *collection_name
144 pipeline: *pipeline
145 readConcern:
146 level: majority
147 outcome: *outcome
148 -
149 description: 'Aggregate with $merge and local readConcern'
150 operations:
151 -
152 object: *collection_readConcern_local
153 name: aggregate
154 arguments: *arguments
155 expectEvents:
156 -
157 client: *client0
158 events:
159 -
160 commandStartedEvent:
161 command:
162 aggregate: *collection_name
163 pipeline: *pipeline
164 readConcern:
165 level: local
166 outcome: *outcome
167 -
168 description: 'Aggregate with $merge and available readConcern'
169 operations:
170 -
171 object: *collection_readConcern_available
172 name: aggregate
173 arguments: *arguments
174 expectEvents:
175 -
176 client: *client0
177 events:
178 -
179 commandStartedEvent:
180 command:
181 aggregate: *collection_name
182 pipeline: *pipeline
183 readConcern:
184 level: available
185 outcome: *outcome
View as plain text