1{
2 "description": "updateMany-hint-serverError",
3 "schemaVersion": "1.0",
4 "runOnRequirements": [
5 {
6 "minServerVersion": "3.4.0",
7 "maxServerVersion": "4.1.9"
8 }
9 ],
10 "createEntities": [
11 {
12 "client": {
13 "id": "client0",
14 "observeEvents": [
15 "commandStartedEvent"
16 ]
17 }
18 },
19 {
20 "database": {
21 "id": "database0",
22 "client": "client0",
23 "databaseName": "crud-v2"
24 }
25 },
26 {
27 "collection": {
28 "id": "collection0",
29 "database": "database0",
30 "collectionName": "test_updatemany_hint"
31 }
32 }
33 ],
34 "initialData": [
35 {
36 "collectionName": "test_updatemany_hint",
37 "databaseName": "crud-v2",
38 "documents": [
39 {
40 "_id": 1,
41 "x": 11
42 },
43 {
44 "_id": 2,
45 "x": 22
46 },
47 {
48 "_id": 3,
49 "x": 33
50 }
51 ]
52 }
53 ],
54 "tests": [
55 {
56 "description": "UpdateMany with hint string unsupported (server-side error)",
57 "operations": [
58 {
59 "object": "collection0",
60 "name": "updateMany",
61 "arguments": {
62 "filter": {
63 "_id": {
64 "$gt": 1
65 }
66 },
67 "update": {
68 "$inc": {
69 "x": 1
70 }
71 },
72 "hint": "_id_"
73 },
74 "expectError": {
75 "isError": true
76 }
77 }
78 ],
79 "expectEvents": [
80 {
81 "client": "client0",
82 "events": [
83 {
84 "commandStartedEvent": {
85 "command": {
86 "update": "test_updatemany_hint",
87 "updates": [
88 {
89 "q": {
90 "_id": {
91 "$gt": 1
92 }
93 },
94 "u": {
95 "$inc": {
96 "x": 1
97 }
98 },
99 "multi": true,
100 "hint": "_id_",
101 "upsert": {
102 "$$unsetOrMatches": false
103 }
104 }
105 ]
106 }
107 }
108 }
109 ]
110 }
111 ],
112 "outcome": [
113 {
114 "collectionName": "test_updatemany_hint",
115 "databaseName": "crud-v2",
116 "documents": [
117 {
118 "_id": 1,
119 "x": 11
120 },
121 {
122 "_id": 2,
123 "x": 22
124 },
125 {
126 "_id": 3,
127 "x": 33
128 }
129 ]
130 }
131 ]
132 },
133 {
134 "description": "UpdateMany with hint document unsupported (server-side error)",
135 "operations": [
136 {
137 "object": "collection0",
138 "name": "updateMany",
139 "arguments": {
140 "filter": {
141 "_id": {
142 "$gt": 1
143 }
144 },
145 "update": {
146 "$inc": {
147 "x": 1
148 }
149 },
150 "hint": {
151 "_id": 1
152 }
153 },
154 "expectError": {
155 "isError": true
156 }
157 }
158 ],
159 "expectEvents": [
160 {
161 "client": "client0",
162 "events": [
163 {
164 "commandStartedEvent": {
165 "command": {
166 "update": "test_updatemany_hint",
167 "updates": [
168 {
169 "q": {
170 "_id": {
171 "$gt": 1
172 }
173 },
174 "u": {
175 "$inc": {
176 "x": 1
177 }
178 },
179 "multi": true,
180 "hint": {
181 "_id": 1
182 },
183 "upsert": {
184 "$$unsetOrMatches": false
185 }
186 }
187 ]
188 }
189 }
190 }
191 ]
192 }
193 ],
194 "outcome": [
195 {
196 "collectionName": "test_updatemany_hint",
197 "databaseName": "crud-v2",
198 "documents": [
199 {
200 "_id": 1,
201 "x": 11
202 },
203 {
204 "_id": 2,
205 "x": 22
206 },
207 {
208 "_id": 3,
209 "x": 33
210 }
211 ]
212 }
213 ]
214 }
215 ]
216}
View as plain text