| 1 |
description: "command" |
| 2 |
|
| 3 |
schemaVersion: "1.0" |
| 4 |
|
| 5 |
createEntities: |
| 6 |
- client: |
| 7 |
id: &client client |
| 8 |
observeEvents: |
| 9 |
- commandStartedEvent |
| 10 |
- commandSucceededEvent |
| 11 |
- commandFailedEvent |
| 12 |
- database: |
| 13 |
id: &database database |
| 14 |
client: *client |
| 15 |
databaseName: &databaseName command-monitoring-tests |
| 16 |
- collection: |
| 17 |
id: &collection collection |
| 18 |
database: *database |
| 19 |
collectionName: &collectionName test |
| 20 |
|
| 21 |
initialData: |
| 22 |
- collectionName: *collectionName |
| 23 |
databaseName: *databaseName |
| 24 |
documents: |
| 25 |
- { _id: 1, x: 11 } |
| 26 |
|
| 27 |
tests: |
| 28 |
- description: "A successful command" |
| 29 |
operations: |
| 30 |
- name: runCommand |
| 31 |
object: *database |
| 32 |
arguments: |
| 33 |
command: { ping: 1 } |
| 34 |
commandName: ping |
| 35 |
expectEvents: |
| 36 |
- client: *client |
| 37 |
events: |
| 38 |
- commandStartedEvent: |
| 39 |
command: |
| 40 |
ping: 1 |
| 41 |
commandName: ping |
| 42 |
databaseName: *databaseName |
| 43 |
- commandSucceededEvent: |
| 44 |
reply: |
| 45 |
ok: 1 |
| 46 |
commandName: ping |
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|