...
1description: expectedEventsForClient-ignoreExtraEvents
2
3schemaVersion: '1.7'
4
5createEntities:
6 - client:
7 id: &client0 client0
8 useMultipleMongoses: true
9 observeEvents:
10 - commandStartedEvent
11 - database:
12 id: &database0 database0
13 client: *client0
14 databaseName: &database0Name database0Name
15 - collection:
16 id: &collection0 collection0
17 database: *database0
18 collectionName: &collection0Name coll0
19
20initialData:
21 - collectionName: *collection0Name
22 databaseName: *database0Name
23 documents: []
24
25tests:
26 - description: ignoreExtraEvents can be set to false
27 operations:
28 - name: insertOne
29 object: *collection0
30 arguments:
31 document: &insertDocument1 { _id: 1 }
32 expectEvents:
33 - client: *client0
34 ignoreExtraEvents: false
35 events:
36 - commandStartedEvent:
37 command:
38 insert: *collection0Name
39 documents:
40 - *insertDocument1
41 commandName: insert
42
43 - description: ignoreExtraEvents can be set to true
44 operations:
45 - name: insertOne
46 object: *collection0
47 arguments:
48 document: &insertDocument2 { _id: 2 }
49 - name: insertOne
50 object: *collection0
51 arguments:
52 document: { _id: 3 }
53 expectEvents:
54 - client: *client0
55 ignoreExtraEvents: true
56 events:
57 - commandStartedEvent:
58 command:
59 insert: *collection0Name
60 documents:
61 - *insertDocument2
62 commandName: insert
63
64 - description: ignoreExtraEvents defaults to false if unset
65 operations:
66 - name: insertOne
67 object: *collection0
68 arguments:
69 document: &insertDocument4 { _id: 4 }
70 expectEvents:
71 - client: *client0
72 events:
73 - commandStartedEvent:
74 command:
75 insert: *collection0Name
76 documents:
77 - *insertDocument4
78 commandName: insert
View as plain text