1{
2 "description": "updateOne-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_updateone_hint"
31 }
32 }
33 ],
34 "initialData": [
35 {
36 "collectionName": "test_updateone_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 }
49 ],
50 "tests": [
51 {
52 "description": "UpdateOne with hint string unsupported (server-side error)",
53 "operations": [
54 {
55 "object": "collection0",
56 "name": "updateOne",
57 "arguments": {
58 "filter": {
59 "_id": {
60 "$gt": 1
61 }
62 },
63 "update": {
64 "$inc": {
65 "x": 1
66 }
67 },
68 "hint": "_id_"
69 },
70 "expectError": {
71 "isError": true
72 }
73 }
74 ],
75 "expectEvents": [
76 {
77 "client": "client0",
78 "events": [
79 {
80 "commandStartedEvent": {
81 "command": {
82 "update": "test_updateone_hint",
83 "updates": [
84 {
85 "q": {
86 "_id": {
87 "$gt": 1
88 }
89 },
90 "u": {
91 "$inc": {
92 "x": 1
93 }
94 },
95 "hint": "_id_",
96 "multi": {
97 "$$unsetOrMatches": false
98 },
99 "upsert": {
100 "$$unsetOrMatches": false
101 }
102 }
103 ]
104 }
105 }
106 }
107 ]
108 }
109 ],
110 "outcome": [
111 {
112 "collectionName": "test_updateone_hint",
113 "databaseName": "crud-v2",
114 "documents": [
115 {
116 "_id": 1,
117 "x": 11
118 },
119 {
120 "_id": 2,
121 "x": 22
122 }
123 ]
124 }
125 ]
126 },
127 {
128 "description": "UpdateOne with hint document unsupported (server-side error)",
129 "operations": [
130 {
131 "object": "collection0",
132 "name": "updateOne",
133 "arguments": {
134 "filter": {
135 "_id": {
136 "$gt": 1
137 }
138 },
139 "update": {
140 "$inc": {
141 "x": 1
142 }
143 },
144 "hint": {
145 "_id": 1
146 }
147 },
148 "expectError": {
149 "isError": true
150 }
151 }
152 ],
153 "expectEvents": [
154 {
155 "client": "client0",
156 "events": [
157 {
158 "commandStartedEvent": {
159 "command": {
160 "update": "test_updateone_hint",
161 "updates": [
162 {
163 "q": {
164 "_id": {
165 "$gt": 1
166 }
167 },
168 "u": {
169 "$inc": {
170 "x": 1
171 }
172 },
173 "hint": {
174 "_id": 1
175 },
176 "multi": {
177 "$$unsetOrMatches": false
178 },
179 "upsert": {
180 "$$unsetOrMatches": false
181 }
182 }
183 ]
184 }
185 }
186 }
187 ]
188 }
189 ],
190 "outcome": [
191 {
192 "collectionName": "test_updateone_hint",
193 "databaseName": "crud-v2",
194 "documents": [
195 {
196 "_id": 1,
197 "x": 11
198 },
199 {
200 "_id": 2,
201 "x": 22
202 }
203 ]
204 }
205 ]
206 }
207 ]
208}
View as plain text