1{
2 "description": "findOneAndUpdate-hint-clientError",
3 "schemaVersion": "1.0",
4 "runOnRequirements": [
5 {
6 "maxServerVersion": "4.0.99"
7 }
8 ],
9 "createEntities": [
10 {
11 "client": {
12 "id": "client0",
13 "observeEvents": [
14 "commandStartedEvent"
15 ]
16 }
17 },
18 {
19 "database": {
20 "id": "database0",
21 "client": "client0",
22 "databaseName": "crud-v2"
23 }
24 },
25 {
26 "collection": {
27 "id": "collection0",
28 "database": "database0",
29 "collectionName": "findOneAndUpdate_hint"
30 }
31 }
32 ],
33 "initialData": [
34 {
35 "collectionName": "findOneAndUpdate_hint",
36 "databaseName": "crud-v2",
37 "documents": [
38 {
39 "_id": 1,
40 "x": 11
41 },
42 {
43 "_id": 2,
44 "x": 22
45 }
46 ]
47 }
48 ],
49 "tests": [
50 {
51 "description": "FindOneAndUpdate with hint string unsupported (client-side error)",
52 "operations": [
53 {
54 "object": "collection0",
55 "name": "findOneAndUpdate",
56 "arguments": {
57 "filter": {
58 "_id": 1
59 },
60 "update": {
61 "$inc": {
62 "x": 1
63 }
64 },
65 "hint": "_id_"
66 },
67 "expectError": {
68 "isError": true
69 }
70 }
71 ],
72 "expectEvents": [
73 {
74 "client": "client0",
75 "events": []
76 }
77 ],
78 "outcome": [
79 {
80 "collectionName": "findOneAndUpdate_hint",
81 "databaseName": "crud-v2",
82 "documents": [
83 {
84 "_id": 1,
85 "x": 11
86 },
87 {
88 "_id": 2,
89 "x": 22
90 }
91 ]
92 }
93 ]
94 },
95 {
96 "description": "FindOneAndUpdate with hint document unsupported (client-side error)",
97 "operations": [
98 {
99 "object": "collection0",
100 "name": "findOneAndUpdate",
101 "arguments": {
102 "filter": {
103 "_id": 1
104 },
105 "update": {
106 "$inc": {
107 "x": 1
108 }
109 },
110 "hint": {
111 "_id": 1
112 }
113 },
114 "expectError": {
115 "isError": true
116 }
117 }
118 ],
119 "expectEvents": [
120 {
121 "client": "client0",
122 "events": []
123 }
124 ],
125 "outcome": [
126 {
127 "collectionName": "findOneAndUpdate_hint",
128 "databaseName": "crud-v2",
129 "documents": [
130 {
131 "_id": 1,
132 "x": 11
133 },
134 {
135 "_id": 2,
136 "x": 22
137 }
138 ]
139 }
140 ]
141 }
142 ]
143}
View as plain text