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