...
1{
2 "description": "replaceOne-validation",
3 "schemaVersion": "1.0",
4 "createEntities": [
5 {
6 "client": {
7 "id": "client0",
8 "observeEvents": [
9 "commandStartedEvent"
10 ]
11 }
12 },
13 {
14 "database": {
15 "id": "database0",
16 "client": "client0",
17 "databaseName": "crud-tests"
18 }
19 },
20 {
21 "collection": {
22 "id": "collection0",
23 "database": "database0",
24 "collectionName": "coll0"
25 }
26 }
27 ],
28 "initialData": [
29 {
30 "collectionName": "coll0",
31 "databaseName": "crud-tests",
32 "documents": [
33 {
34 "_id": 1,
35 "x": 11
36 }
37 ]
38 }
39 ],
40 "tests": [
41 {
42 "description": "ReplaceOne prohibits atomic modifiers",
43 "operations": [
44 {
45 "name": "replaceOne",
46 "object": "collection0",
47 "arguments": {
48 "filter": {
49 "_id": 1
50 },
51 "replacement": {
52 "$set": {
53 "x": 22
54 }
55 }
56 },
57 "expectError": {
58 "isClientError": true
59 }
60 }
61 ],
62 "expectEvents": [
63 {
64 "client": "client0",
65 "events": []
66 }
67 ],
68 "outcome": [
69 {
70 "collectionName": "coll0",
71 "databaseName": "crud-tests",
72 "documents": [
73 {
74 "_id": 1,
75 "x": 11
76 }
77 ]
78 }
79 ]
80 }
81 ]
82}
View as plain text