bson/testdata/command-monitoring/pre-42-server-connection-id.json
2025-03-17 20:58:26 +01:00

102 lines
2.1 KiB
JSON

{
"description": "pre-42-server-connection-id",
"schemaVersion": "1.6",
"runOnRequirements": [
{
"maxServerVersion": "4.0.99"
}
],
"createEntities": [
{
"client": {
"id": "client",
"observeEvents": [
"commandStartedEvent",
"commandSucceededEvent",
"commandFailedEvent"
]
}
},
{
"database": {
"id": "database",
"client": "client",
"databaseName": "server-connection-id-tests"
}
},
{
"collection": {
"id": "collection",
"database": "database",
"collectionName": "coll"
}
}
],
"initialData": [
{
"databaseName": "server-connection-id-tests",
"collectionName": "coll",
"documents": []
}
],
"tests": [
{
"description": "command events do not include server connection id",
"operations": [
{
"name": "insertOne",
"object": "collection",
"arguments": {
"document": {
"x": 1
}
}
},
{
"name": "find",
"object": "collection",
"arguments": {
"filter": {
"$or": true
}
},
"expectError": {
"isError": true
}
}
],
"expectEvents": [
{
"client": "client",
"events": [
{
"commandStartedEvent": {
"commandName": "insert",
"hasServerConnectionId": false
}
},
{
"commandSucceededEvent": {
"commandName": "insert",
"hasServerConnectionId": false
}
},
{
"commandStartedEvent": {
"commandName": "find",
"hasServerConnectionId": false
}
},
{
"commandFailedEvent": {
"commandName": "find",
"hasServerConnectionId": false
}
}
]
}
]
}
]
}