...
1description: "server-connection-id"
2
3schemaVersion: "1.6"
4
5runOnRequirements:
6 - minServerVersion: "4.2"
7
8createEntities:
9 - client:
10 id: &client client
11 observeEvents:
12 - commandStartedEvent
13 - commandSucceededEvent
14 - commandFailedEvent
15 - database:
16 id: &database database
17 client: *client
18 databaseName: &databaseName server-connection-id-tests
19 - collection:
20 id: &collection collection
21 database: *database
22 collectionName: &collectionName coll
23
24initialData:
25 - databaseName: *databaseName
26 collectionName: *collectionName
27 documents: []
28
29tests:
30 - description: "command events include server connection id"
31 operations:
32 - name: insertOne
33 object: *collection
34 arguments:
35 document: { x: 1 }
36 - name: find
37 object: *collection
38 arguments:
39 filter: { $or: true }
40 expectError:
41 isError: true
42 expectEvents:
43 - client: *client
44 events:
45 - commandStartedEvent:
46 commandName: insert
47 hasServerConnectionId: true
48 - commandSucceededEvent:
49 commandName: insert
50 hasServerConnectionId: true
51 - commandStartedEvent:
52 commandName: find
53 hasServerConnectionId: true
54 - commandFailedEvent:
55 commandName: find
56 hasServerConnectionId: true
View as plain text