| 1 |
description: expectedEventsForClient-eventType |
| 2 |
|
| 3 |
schemaVersion: '1.3' |
| 4 |
|
| 5 |
createEntities: |
| 6 |
- client: |
| 7 |
id: &client0 client0 |
| 8 |
useMultipleMongoses: true |
| 9 |
observeEvents: |
| 10 |
- commandStartedEvent |
| 11 |
- connectionReadyEvent |
| 12 |
- database: |
| 13 |
id: &database0 database0 |
| 14 |
client: *client0 |
| 15 |
databaseName: &database0Name database0Name |
| 16 |
- collection: |
| 17 |
id: &collection0 collection0 |
| 18 |
database: *database0 |
| 19 |
collectionName: &collection0Name coll0 |
| 20 |
|
| 21 |
initialData: |
| 22 |
- collectionName: *collection0Name |
| 23 |
databaseName: *database0Name |
| 24 |
documents: [] |
| 25 |
|
| 26 |
tests: |
| 27 |
- description: eventType can be set to command and cmap |
| 28 |
operations: |
| 29 |
- name: insertOne |
| 30 |
object: *collection0 |
| 31 |
arguments: |
| 32 |
document: &insertDocument { _id: 1 } |
| 33 |
expectEvents: |
| 34 |
- client: *client0 |
| 35 |
eventType: command |
| 36 |
events: |
| 37 |
- commandStartedEvent: |
| 38 |
command: |
| 39 |
insert: *collection0Name |
| 40 |
documents: |
| 41 |
- *insertDocument |
| 42 |
commandName: insert |
| 43 |
- client: *client0 |
| 44 |
eventType: cmap |
| 45 |
events: |
| 46 |
- connectionReadyEvent: {} |
| 47 |
|
| 48 |
- description: eventType defaults to command if unset |
| 49 |
operations: |
| 50 |
- name: insertOne |
| 51 |
object: *collection0 |
| 52 |
arguments: |
| 53 |
document: *insertDocument |
| 54 |
expectEvents: |
| 55 |
- client: *client0 |
| 56 |
events: |
| 57 |
- commandStartedEvent: |
| 58 |
command: |
| 59 |
insert: *collection0Name |
| 60 |
documents: |
| 61 |
- *insertDocument |
| 62 |
commandName: insert |
| 63 |
- client: *client0 |
| 64 |
eventType: cmap |
| 65 |
events: |
| 66 |
- connectionReadyEvent: {} |