...
1description: snapshot-sessions-unsupported-ops
2
3schemaVersion: "1.0"
4
5runOnRequirements:
6 - minServerVersion: "5.0"
7 topologies: [replicaset, sharded-replicaset]
8
9createEntities:
10 - client:
11 id: &client0 client0
12 observeEvents: [ commandStartedEvent, commandFailedEvent ]
13 - database:
14 id: &database0Name database0
15 client: *client0
16 databaseName: *database0Name
17 - collection:
18 id: &collection0Name collection0
19 database: *database0Name
20 collectionName: *collection0Name
21 - session:
22 id: session0
23 client: client0
24 sessionOptions:
25 snapshot: true
26
27initialData:
28 - collectionName: *collection0Name
29 databaseName: *database0Name
30 documents:
31 - { _id: 1, x: 11 }
32
33tests:
34- description: Server returns an error on insertOne with snapshot
35 # Skip on sharded clusters due to SERVER-58176.
36 runOnRequirements:
37 - topologies: [replicaset]
38 operations:
39 - name: insertOne
40 object: collection0
41 arguments:
42 session: session0
43 document:
44 _id: 22
45 x: 22
46 expectError:
47 isError: true
48 isClientError: false
49 expectEvents:
50 - client: client0
51 events:
52 - commandStartedEvent:
53 command:
54 insert: collection0
55 readConcern:
56 level: snapshot
57 atClusterTime:
58 "$$exists": false
59 - commandFailedEvent:
60 commandName: insert
61
62- description: Server returns an error on insertMany with snapshot
63 # Skip on sharded clusters due to SERVER-58176.
64 runOnRequirements:
65 - topologies: [replicaset]
66 operations:
67 - name: insertMany
68 object: collection0
69 arguments:
70 session: session0
71 documents:
72 - _id: 22
73 x: 22
74 - _id: 33
75 x: 33
76 expectError:
77 isError: true
78 isClientError: false
79 expectEvents:
80 - client: client0
81 events:
82 - commandStartedEvent:
83 command:
84 insert: collection0
85 readConcern:
86 level: snapshot
87 atClusterTime:
88 "$$exists": false
89 - commandFailedEvent:
90 commandName: insert
91
92- description: Server returns an error on deleteOne with snapshot
93 # Skip on sharded clusters due to SERVER-58176.
94 runOnRequirements:
95 - topologies: [replicaset]
96 operations:
97 - name: deleteOne
98 object: collection0
99 arguments:
100 session: session0
101 filter: {}
102 expectError:
103 isError: true
104 isClientError: false
105 expectEvents:
106 - client: client0
107 events:
108 - commandStartedEvent:
109 command:
110 delete: collection0
111 readConcern:
112 level: snapshot
113 atClusterTime:
114 "$$exists": false
115 - commandFailedEvent:
116 commandName: delete
117
118- description: Server returns an error on updateOne with snapshot
119 # Skip on sharded clusters due to SERVER-58176.
120 runOnRequirements:
121 - topologies: [replicaset]
122 operations:
123 - name: updateOne
124 object: collection0
125 arguments:
126 session: session0
127 filter: { _id: 1 }
128 update: { $inc: { x: 1 } }
129 expectError:
130 isError: true
131 isClientError: false
132 expectEvents:
133 - client: client0
134 events:
135 - commandStartedEvent:
136 command:
137 update: collection0
138 readConcern:
139 level: snapshot
140 atClusterTime:
141 "$$exists": false
142 - commandFailedEvent:
143 commandName: update
144
145- description: Server returns an error on findOneAndUpdate with snapshot
146 operations:
147 - name: findOneAndUpdate
148 object: collection0
149 arguments:
150 session: session0
151 filter: { _id: 1 }
152 update: { $inc: { x: 1 } }
153 expectError:
154 isError: true
155 isClientError: false
156 expectEvents:
157 - client: client0
158 events:
159 - commandStartedEvent:
160 command:
161 findAndModify: collection0
162 readConcern:
163 level: snapshot
164 atClusterTime:
165 "$$exists": false
166 - commandFailedEvent:
167 commandName: findAndModify
168
169- description: Server returns an error on listDatabases with snapshot
170 operations:
171 - name: listDatabases
172 object: client0
173 arguments:
174 session: session0
175 expectError:
176 isError: true
177 isClientError: false
178 expectEvents:
179 - client: client0
180 events:
181 - commandStartedEvent:
182 command:
183 listDatabases: 1
184 readConcern:
185 level: snapshot
186 atClusterTime:
187 "$$exists": false
188 - commandFailedEvent:
189 commandName: listDatabases
190
191- description: Server returns an error on listCollections with snapshot
192 operations:
193 - name: listCollections
194 object: database0
195 arguments:
196 session: session0
197 expectError:
198 isError: true
199 isClientError: false
200 expectEvents:
201 - client: client0
202 events:
203 - commandStartedEvent:
204 command:
205 listCollections: 1
206 readConcern:
207 level: snapshot
208 atClusterTime:
209 "$$exists": false
210 - commandFailedEvent:
211 commandName: listCollections
212
213- description: Server returns an error on listIndexes with snapshot
214 operations:
215 - name: listIndexes
216 object: collection0
217 arguments:
218 session: session0
219 expectError:
220 isError: true
221 isClientError: false
222 expectEvents:
223 - client: client0
224 events:
225 - commandStartedEvent:
226 command:
227 listIndexes: collection0
228 readConcern:
229 level: snapshot
230 atClusterTime:
231 "$$exists": false
232 - commandFailedEvent:
233 commandName: listIndexes
234
235- description: Server returns an error on runCommand with snapshot
236 operations:
237 - name: runCommand
238 object: database0
239 arguments:
240 session: session0
241 commandName: listCollections
242 command:
243 listCollections: 1
244 expectError:
245 isError: true
246 isClientError: false
247 expectEvents:
248 - client: client0
249 events:
250 - commandStartedEvent:
251 command:
252 listCollections: 1
253 readConcern:
254 level: snapshot
255 atClusterTime:
256 "$$exists": false
257 - commandFailedEvent:
258 commandName: listCollections
View as plain text