...
1{
2 "description": "Test commands: deprecation errors",
3 "schemaVersion": "1.1",
4 "runOnRequirements": [
5 {
6 "minServerVersion": "4.9",
7 "serverParameters": {
8 "enableTestCommands": true,
9 "acceptApiVersion2": true,
10 "requireApiVersion": false
11 }
12 }
13 ],
14 "createEntities": [
15 {
16 "client": {
17 "id": "client",
18 "observeEvents": [
19 "commandStartedEvent"
20 ]
21 }
22 },
23 {
24 "database": {
25 "id": "database",
26 "client": "client",
27 "databaseName": "versioned-api-tests"
28 }
29 }
30 ],
31 "tests": [
32 {
33 "description": "Running a command that is deprecated raises a deprecation error",
34 "operations": [
35 {
36 "name": "runCommand",
37 "object": "database",
38 "arguments": {
39 "commandName": "testDeprecationInVersion2",
40 "command": {
41 "testDeprecationInVersion2": 1,
42 "apiVersion": "2",
43 "apiDeprecationErrors": true
44 }
45 },
46 "expectError": {
47 "isError": true,
48 "errorContains": "command testDeprecationInVersion2 is deprecated in API Version 2",
49 "errorCodeName": "APIDeprecationError"
50 }
51 }
52 ],
53 "expectEvents": [
54 {
55 "client": "client",
56 "events": [
57 {
58 "commandStartedEvent": {
59 "command": {
60 "testDeprecationInVersion2": 1,
61 "apiVersion": "2",
62 "apiStrict": {
63 "$$exists": false
64 },
65 "apiDeprecationErrors": true
66 }
67 }
68 }
69 ]
70 }
71 ]
72 }
73 ]
74}
View as plain text