...

Text file src/go.mongodb.org/mongo-driver/testdata/index-management/updateSearchIndex.json

Documentation: go.mongodb.org/mongo-driver/testdata/index-management

     1{
     2  "description": "updateSearchIndex",
     3  "schemaVersion": "1.4",
     4  "createEntities": [
     5    {
     6      "client": {
     7        "id": "client0",
     8        "useMultipleMongoses": false,
     9        "observeEvents": [
    10          "commandStartedEvent"
    11        ]
    12      }
    13    },
    14    {
    15      "database": {
    16        "id": "database0",
    17        "client": "client0",
    18        "databaseName": "database0"
    19      }
    20    },
    21    {
    22      "collection": {
    23        "id": "collection0",
    24        "database": "database0",
    25        "collectionName": "collection0"
    26      }
    27    }
    28  ],
    29  "runOnRequirements": [
    30    {
    31      "minServerVersion": "7.0.0",
    32      "topologies": [
    33        "replicaset",
    34        "load-balanced",
    35        "sharded"
    36      ],
    37      "serverless": "forbid"
    38    }
    39  ],
    40  "tests": [
    41    {
    42      "description": "sends the correct command",
    43      "operations": [
    44        {
    45          "name": "updateSearchIndex",
    46          "object": "collection0",
    47          "arguments": {
    48            "name": "test index",
    49            "definition": {}
    50          },
    51          "expectError": {
    52            "isError": true,
    53            "errorContains": "Atlas"
    54          }
    55        }
    56      ],
    57      "expectEvents": [
    58        {
    59          "client": "client0",
    60          "events": [
    61            {
    62              "commandStartedEvent": {
    63                "command": {
    64                  "updateSearchIndex": "collection0",
    65                  "name": "test index",
    66                  "definition": {},
    67                  "$db": "database0"
    68                }
    69              }
    70            }
    71          ]
    72        }
    73      ]
    74    }
    75  ]
    76}

View as plain text