| 1 | { |
| 2 | "description": "no-handshake-command-logs", |
| 3 | "schemaVersion": "1.13", |
| 4 | "tests": [ |
| 5 | { |
| 6 | "description": "Handshake commands should not generate log messages", |
| 7 | "operations": [ |
| 8 | { |
| 9 | "name": "createEntities", |
| 10 | "object": "testRunner", |
| 11 | "arguments": { |
| 12 | "entities": [ |
| 13 | { |
| 14 | "client": { |
| 15 | "id": "client", |
| 16 | "observeLogMessages": { |
| 17 | "command": "debug" |
| 18 | }, |
| 19 | "observeEvents": [ |
| 20 | "connectionCreatedEvent", |
| 21 | "connectionReadyEvent" |
| 22 | ] |
| 23 | } |
| 24 | }, |
| 25 | { |
| 26 | "database": { |
| 27 | "id": "database", |
| 28 | "client": "client", |
| 29 | "databaseName": "logging-tests" |
| 30 | } |
| 31 | } |
| 32 | ] |
| 33 | } |
| 34 | }, |
| 35 | { |
| 36 | "name": "runCommand", |
| 37 | "object": "database", |
| 38 | "arguments": { |
| 39 | "command": { |
| 40 | "ping": 1 |
| 41 | }, |
| 42 | "commandName": "ping" |
| 43 | } |
| 44 | }, |
| 45 | { |
| 46 | "name": "waitForEvent", |
| 47 | "object": "testRunner", |
| 48 | "arguments": { |
| 49 | "client": "client", |
| 50 | "event": { |
| 51 | "connectionCreatedEvent": {} |
| 52 | }, |
| 53 | "count": 1 |
| 54 | } |
| 55 | }, |
| 56 | { |
| 57 | "name": "waitForEvent", |
| 58 | "object": "testRunner", |
| 59 | "arguments": { |
| 60 | "client": "client", |
| 61 | "event": { |
| 62 | "connectionReadyEvent": {} |
| 63 | }, |
| 64 | "count": 1 |
| 65 | } |
| 66 | } |
| 67 | ], |
| 68 | "expectLogMessages": [ |
| 69 | { |
| 70 | "client": "client", |
| 71 | "messages": [ |
| 72 | { |
| 73 | "level": "debug", |
| 74 | "component": "command", |
| 75 | "data": { |
| 76 | "message": "Command started", |
| 77 | "databaseName": "logging-tests", |
| 78 | "commandName": "ping" |
| 79 | } |
| 80 | }, |
| 81 | { |
| 82 | "level": "debug", |
| 83 | "component": "command", |
| 84 | "data": { |
| 85 | "message": "Command succeeded", |
| 86 | "commandName": "ping" |
| 87 | } |
| 88 | } |
| 89 | ] |
| 90 | } |
| 91 | ] |
| 92 | } |
| 93 | ] |
| 94 | } |