...
1{
2 "description": "RunCommand helper: No API version declared",
3 "schemaVersion": "1.4",
4 "runOnRequirements": [
5 {
6 "minServerVersion": "4.9",
7 "serverParameters": {
8 "requireApiVersion": false
9 }
10 }
11 ],
12 "createEntities": [
13 {
14 "client": {
15 "id": "client",
16 "observeEvents": [
17 "commandStartedEvent"
18 ]
19 }
20 },
21 {
22 "database": {
23 "id": "database",
24 "client": "client",
25 "databaseName": "versioned-api-tests"
26 }
27 }
28 ],
29 "tests": [
30 {
31 "description": "runCommand does not inspect or change the command document",
32 "runOnRequirements": [
33 {
34 "serverless": "forbid"
35 }
36 ],
37 "operations": [
38 {
39 "name": "runCommand",
40 "object": "database",
41 "arguments": {
42 "commandName": "ping",
43 "command": {
44 "ping": 1,
45 "apiVersion": "server_will_never_support_this_api_version"
46 }
47 },
48 "expectError": {
49 "isError": true,
50 "isClientError": false
51 }
52 }
53 ],
54 "expectEvents": [
55 {
56 "client": "client",
57 "events": [
58 {
59 "commandStartedEvent": {
60 "command": {
61 "ping": 1,
62 "apiVersion": "server_will_never_support_this_api_version",
63 "apiStrict": {
64 "$$exists": false
65 },
66 "apiDeprecationErrors": {
67 "$$exists": false
68 }
69 },
70 "commandName": "ping",
71 "databaseName": "versioned-api-tests"
72 }
73 }
74 ]
75 }
76 ]
77 },
78 {
79 "description": "runCommand does not prevent sending invalid API version declarations",
80 "runOnRequirements": [
81 {
82 "serverless": "forbid"
83 }
84 ],
85 "operations": [
86 {
87 "name": "runCommand",
88 "object": "database",
89 "arguments": {
90 "commandName": "ping",
91 "command": {
92 "ping": 1,
93 "apiStrict": true
94 }
95 },
96 "expectError": {
97 "isError": true,
98 "isClientError": false
99 }
100 }
101 ],
102 "expectEvents": [
103 {
104 "client": "client",
105 "events": [
106 {
107 "commandStartedEvent": {
108 "command": {
109 "ping": 1,
110 "apiVersion": {
111 "$$exists": false
112 },
113 "apiStrict": true,
114 "apiDeprecationErrors": {
115 "$$exists": false
116 }
117 },
118 "commandName": "ping",
119 "databaseName": "versioned-api-tests"
120 }
121 }
122 ]
123 }
124 ]
125 }
126 ]
127}
View as plain text