...
1description: "RunCommand helper: No API version declared"
2
3schemaVersion: "1.4"
4
5runOnRequirements:
6 - minServerVersion: "4.9"
7 serverParameters:
8 requireApiVersion: false
9
10createEntities:
11 - client:
12 id: &client client
13 observeEvents:
14 - commandStartedEvent
15 - database:
16 id: &database database
17 client: *client
18 databaseName: &databaseName versioned-api-tests
19
20tests:
21 - description: "runCommand does not inspect or change the command document"
22 runOnRequirements:
23 # serverless does not currently reject invalid API versions on
24 # certain commands (CLOUDP-87926)
25 - serverless: "forbid"
26 operations:
27 - name: runCommand
28 object: *database
29 arguments:
30 commandName: ping
31 command:
32 ping: 1
33 apiVersion: "server_will_never_support_this_api_version"
34 expectError:
35 isError: true
36 isClientError: false
37 expectEvents:
38 - client: *client
39 events:
40 - commandStartedEvent:
41 command:
42 ping: 1
43 apiVersion: "server_will_never_support_this_api_version"
44 apiStrict: { $$exists: false }
45 apiDeprecationErrors: { $$exists: false }
46 commandName: ping
47 databaseName: *databaseName
48
49 - description: "runCommand does not prevent sending invalid API version declarations"
50 runOnRequirements:
51 # serverless does not currently reject invalid API versions on
52 # certain commands (CLOUDP-87926)
53 - serverless: "forbid"
54 operations:
55 - name: runCommand
56 object: *database
57 arguments:
58 commandName: ping
59 command:
60 ping: 1
61 apiStrict: true
62 expectError:
63 isError: true
64 isClientError: false
65 expectEvents:
66 - client: *client
67 events:
68 - commandStartedEvent:
69 command:
70 ping: 1
71 apiVersion: { $$exists: false }
72 apiStrict: true
73 apiDeprecationErrors: { $$exists: false }
74 commandName: ping
75 databaseName: *databaseName
View as plain text