1{
2 "description": "estimatedDocumentCount-comment",
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": "edc-comment-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": "edc-comment-tests",
32 "documents": [
33 {
34 "_id": 1,
35 "x": 11
36 },
37 {
38 "_id": 2,
39 "x": 22
40 },
41 {
42 "_id": 3,
43 "x": 33
44 }
45 ]
46 }
47 ],
48 "tests": [
49 {
50 "description": "estimatedDocumentCount with document comment",
51 "runOnRequirements": [
52 {
53 "minServerVersion": "4.4.14"
54 }
55 ],
56 "operations": [
57 {
58 "name": "estimatedDocumentCount",
59 "object": "collection0",
60 "arguments": {
61 "comment": {
62 "key": "value"
63 }
64 },
65 "expectResult": 3
66 }
67 ],
68 "expectEvents": [
69 {
70 "client": "client0",
71 "events": [
72 {
73 "commandStartedEvent": {
74 "command": {
75 "count": "coll0",
76 "comment": {
77 "key": "value"
78 }
79 },
80 "commandName": "count",
81 "databaseName": "edc-comment-tests"
82 }
83 }
84 ]
85 }
86 ]
87 },
88 {
89 "description": "estimatedDocumentCount with string comment",
90 "runOnRequirements": [
91 {
92 "minServerVersion": "4.4.0"
93 }
94 ],
95 "operations": [
96 {
97 "name": "estimatedDocumentCount",
98 "object": "collection0",
99 "arguments": {
100 "comment": "comment"
101 },
102 "expectResult": 3
103 }
104 ],
105 "expectEvents": [
106 {
107 "client": "client0",
108 "events": [
109 {
110 "commandStartedEvent": {
111 "command": {
112 "count": "coll0",
113 "comment": "comment"
114 },
115 "commandName": "count",
116 "databaseName": "edc-comment-tests"
117 }
118 }
119 ]
120 }
121 ]
122 },
123 {
124 "description": "estimatedDocumentCount with document comment - pre 4.4.14, server error",
125 "runOnRequirements": [
126 {
127 "minServerVersion": "3.6.0",
128 "maxServerVersion": "4.4.13",
129 "topologies": [
130 "single",
131 "replicaset"
132 ]
133 }
134 ],
135 "operations": [
136 {
137 "name": "estimatedDocumentCount",
138 "object": "collection0",
139 "arguments": {
140 "comment": {
141 "key": "value"
142 }
143 },
144 "expectError": {
145 "isClientError": false
146 }
147 }
148 ],
149 "expectEvents": [
150 {
151 "client": "client0",
152 "events": [
153 {
154 "commandStartedEvent": {
155 "command": {
156 "count": "coll0",
157 "comment": {
158 "key": "value"
159 }
160 },
161 "commandName": "count",
162 "databaseName": "edc-comment-tests"
163 }
164 }
165 ]
166 }
167 ]
168 }
169 ]
170}
View as plain text