...
1description: "Test commands: deprecation errors"
2
3schemaVersion: "1.1"
4
5runOnRequirements:
6 - minServerVersion: "4.9"
7 serverParameters:
8 enableTestCommands: true
9 acceptApiVersion2: true
10 requireApiVersion: false
11
12createEntities:
13 - client:
14 id: &client client
15 observeEvents:
16 - commandStartedEvent
17 # This client is configured without a declared API version, as we cannot
18 # declare an unknown API version.
19 - database:
20 id: &database database
21 client: *client
22 databaseName: &databaseName versioned-api-tests
23
24tests:
25 - description: "Running a command that is deprecated raises a deprecation error"
26 operations:
27 - name: runCommand
28 object: *database
29 arguments:
30 commandName: testDeprecationInVersion2
31 command:
32 testDeprecationInVersion2: 1
33 apiVersion: "2"
34 apiDeprecationErrors: true
35 expectError:
36 isError: true
37 errorContains: "command testDeprecationInVersion2 is deprecated in API Version 2"
38 errorCodeName: "APIDeprecationError"
39 expectEvents:
40 - client: *client
41 events:
42 - commandStartedEvent:
43 command:
44 testDeprecationInVersion2: 1
45 apiVersion: "2"
46 apiStrict: { $$exists: false }
47 apiDeprecationErrors: true
View as plain text