Debian Codegraph @

src/libmongoc/tests/json/command-logging-and-monitoring/monitoring/unacknowledged-client-bulkWrite.json

raw
1 {
2 "description": "unacknowledged-client-bulkWrite",
3 "schemaVersion": "1.7",
4 "runOnRequirements": [
5 {
6 "minServerVersion": "8.0",
7 "serverless": "forbid"
8 }
9 ],
10 "createEntities": [
11 {
12 "client": {
13 "id": "client",
14 "useMultipleMongoses": false,
15 "observeEvents": [
16 "commandStartedEvent",
17 "commandSucceededEvent",
18 "commandFailedEvent"
19 ],
20 "uriOptions": {
21 "w": 0
22 }
23 }
24 },
25 {
26 "database": {
27 "id": "database",
28 "client": "client",
29 "databaseName": "command-monitoring-tests"
30 }
31 },
32 {
33 "collection": {
34 "id": "collection",
35 "database": "database",
36 "collectionName": "test"
37 }
38 }
39 ],
40 "initialData": [
41 {
42 "collectionName": "test",
43 "databaseName": "command-monitoring-tests",
44 "documents": [
45 {
46 "_id": 1,
47 "x": 11
48 },
49 {
50 "_id": 2,
51 "x": 22
52 },
53 {
54 "_id": 3,
55 "x": 33
56 }
57 ]
58 }
59 ],
60 "_yamlAnchors": {
61 "namespace": "command-monitoring-tests.test"
62 },
63 "tests": [
64 {
65 "description": "A successful mixed client bulkWrite",
66 "operations": [
67 {
68 "object": "client",
69 "name": "clientBulkWrite",
70 "arguments": {
71 "models": [
72 {
73 "insertOne": {
74 "namespace": "command-monitoring-tests.test",
75 "document": {
76 "_id": 4,
77 "x": 44
78 }
79 }
80 },
81 {
82 "updateOne": {
83 "namespace": "command-monitoring-tests.test",
84 "filter": {
85 "_id": 3
86 },
87 "update": {
88 "$set": {
89 "x": 333
90 }
91 }
92 }
93 }
94 ],
95 "ordered": false
96 },
97 "expectResult": {
98 "$$unsetOrMatches": {
99 "acknowledged": {
100 "$$unsetOrMatches": false
101 },
102 "insertedCount": {
103 "$$unsetOrMatches": 0
104 },
105 "upsertedCount": {
106 "$$unsetOrMatches": 0
107 },
108 "matchedCount": {
109 "$$unsetOrMatches": 0
110 },
111 "modifiedCount": {
112 "$$unsetOrMatches": 0
113 },
114 "deletedCount": {
115 "$$unsetOrMatches": 0
116 },
117 "insertResults": {
118 "$$unsetOrMatches": {}
119 },
120 "updateResults": {
121 "$$unsetOrMatches": {}
122 },
123 "deleteResults": {
124 "$$unsetOrMatches": {}
125 }
126 }
127 }
128 },
129 {
130 "object": "collection",
131 "name": "find",
132 "arguments": {
133 "filter": {}
134 },
135 "expectResult": [
136 {
137 "_id": 1,
138 "x": 11
139 },
140 {
141 "_id": 2,
142 "x": 22
143 },
144 {
145 "_id": 3,
146 "x": 333
147 },
148 {
149 "_id": 4,
150 "x": 44
151 }
152 ]
153 }
154 ],
155 "expectEvents": [
156 {
157 "client": "client",
158 "ignoreExtraEvents": true,
159 "events": [
160 {
161 "commandStartedEvent": {
162 "commandName": "bulkWrite",
163 "databaseName": "admin",
164 "command": {
165 "bulkWrite": 1,
166 "errorsOnly": true,
167 "ordered": false,
168 "ops": [
169 {
170 "insert": 0,
171 "document": {
172 "_id": 4,
173 "x": 44
174 }
175 },
176 {
177 "update": 0,
178 "filter": {
179 "_id": 3
180 },
181 "updateMods": {
182 "$set": {
183 "x": 333
184 }
185 },
186 "multi": false
187 }
188 ],
189 "nsInfo": [
190 {
191 "ns": "command-monitoring-tests.test"
192 }
193 ]
194 }
195 }
196 },
197 {
198 "commandSucceededEvent": {
199 "commandName": "bulkWrite",
200 "reply": {
201 "ok": 1,
202 "nInserted": {
203 "$$exists": false
204 },
205 "nMatched": {
206 "$$exists": false
207 },
208 "nModified": {
209 "$$exists": false
210 },
211 "nUpserted": {
212 "$$exists": false
213 },
214 "nDeleted": {
215 "$$exists": false
216 }
217 }
218 }
219 }
220 ]
221 }
222 ]
223 }
224 ]
225 }