1{
2 "description": "findOneAndReplace-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": "findOneAndReplace_hint"
30 }
31 }
32 ],
33 "initialData": [
34 {
35 "collectionName": "findOneAndReplace_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": "FindOneAndReplace with hint string unsupported (client-side error)",
52 "operations": [
53 {
54 "object": "collection0",
55 "name": "findOneAndReplace",
56 "arguments": {
57 "filter": {
58 "_id": 1
59 },
60 "replacement": {
61 "x": 33
62 },
63 "hint": "_id_"
64 },
65 "expectError": {
66 "isError": true
67 }
68 }
69 ],
70 "expectEvents": [
71 {
72 "client": "client0",
73 "events": []
74 }
75 ],
76 "outcome": [
77 {
78 "collectionName": "findOneAndReplace_hint",
79 "databaseName": "crud-v2",
80 "documents": [
81 {
82 "_id": 1,
83 "x": 11
84 },
85 {
86 "_id": 2,
87 "x": 22
88 }
89 ]
90 }
91 ]
92 },
93 {
94 "description": "FindOneAndReplace with hint document unsupported (client-side error)",
95 "operations": [
96 {
97 "object": "collection0",
98 "name": "findOneAndReplace",
99 "arguments": {
100 "filter": {
101 "_id": 1
102 },
103 "replacement": {
104 "x": 33
105 },
106 "hint": {
107 "_id": 1
108 }
109 },
110 "expectError": {
111 "isError": true
112 }
113 }
114 ],
115 "expectEvents": [
116 {
117 "client": "client0",
118 "events": []
119 }
120 ],
121 "outcome": [
122 {
123 "collectionName": "findOneAndReplace_hint",
124 "databaseName": "crud-v2",
125 "documents": [
126 {
127 "_id": 1,
128 "x": 11
129 },
130 {
131 "_id": 2,
132 "x": 22
133 }
134 ]
135 }
136 ]
137 }
138 ]
139}
View as plain text