...

Text file src/go.mongodb.org/mongo-driver/testdata/command-monitoring/pre-42-server-connection-id.json

Documentation: go.mongodb.org/mongo-driver/testdata/command-monitoring

     1{
     2  "description": "pre-42-server-connection-id",
     3  "schemaVersion": "1.6",
     4  "runOnRequirements": [
     5    {
     6      "maxServerVersion": "4.0.99"
     7    }
     8  ],
     9  "createEntities": [
    10    {
    11      "client": {
    12        "id": "client",
    13        "observeEvents": [
    14          "commandStartedEvent",
    15          "commandSucceededEvent",
    16          "commandFailedEvent"
    17        ]
    18      }
    19    },
    20    {
    21      "database": {
    22        "id": "database",
    23        "client": "client",
    24        "databaseName": "server-connection-id-tests"
    25      }
    26    },
    27    {
    28      "collection": {
    29        "id": "collection",
    30        "database": "database",
    31        "collectionName": "coll"
    32      }
    33    }
    34  ],
    35  "initialData": [
    36    {
    37      "databaseName": "server-connection-id-tests",
    38      "collectionName": "coll",
    39      "documents": []
    40    }
    41  ],
    42  "tests": [
    43    {
    44      "description": "command events do not include server connection id",
    45      "operations": [
    46        {
    47          "name": "insertOne",
    48          "object": "collection",
    49          "arguments": {
    50            "document": {
    51              "x": 1
    52            }
    53          }
    54        },
    55        {
    56          "name": "find",
    57          "object": "collection",
    58          "arguments": {
    59            "filter": {
    60              "$or": true
    61            }
    62          },
    63          "expectError": {
    64            "isError": true
    65          }
    66        }
    67      ],
    68      "expectEvents": [
    69        {
    70          "client": "client",
    71          "events": [
    72            {
    73              "commandStartedEvent": {
    74                "commandName": "insert",
    75                "hasServerConnectionId": false
    76              }
    77            },
    78            {
    79              "commandSucceededEvent": {
    80                "commandName": "insert",
    81                "hasServerConnectionId": false
    82              }
    83            },
    84            {
    85              "commandStartedEvent": {
    86                "commandName": "find",
    87                "hasServerConnectionId": false
    88              }
    89            },
    90            {
    91              "commandFailedEvent": {
    92                "commandName": "find",
    93                "hasServerConnectionId": false
    94              }
    95            }
    96          ]
    97        }
    98      ]
    99    }
   100  ]
   101}

View as plain text