...

Text file src/go.mongodb.org/mongo-driver/testdata/crud/unified/deleteMany-hint-clientError.json

Documentation: go.mongodb.org/mongo-driver/testdata/crud/unified

     1{
     2  "description": "deleteMany-hint-clientError",
     3  "schemaVersion": "1.0",
     4  "runOnRequirements": [
     5    {
     6      "maxServerVersion": "3.3.99"
     7    }
     8  ],
     9  "createEntities": [
    10    {
    11      "client": {
    12        "id": "client0",
    13        "observeEvents": [
    14          "commandStartedEvent"
    15        ]
    16      }
    17    },
    18    {
    19      "database": {
    20        "id": "database0",
    21        "client": "client0",
    22        "databaseName": "crud-v2"
    23      }
    24    },
    25    {
    26      "collection": {
    27        "id": "collection0",
    28        "database": "database0",
    29        "collectionName": "DeleteMany_hint"
    30      }
    31    }
    32  ],
    33  "initialData": [
    34    {
    35      "collectionName": "DeleteMany_hint",
    36      "databaseName": "crud-v2",
    37      "documents": [
    38        {
    39          "_id": 1,
    40          "x": 11
    41        },
    42        {
    43          "_id": 2,
    44          "x": 22
    45        },
    46        {
    47          "_id": 3,
    48          "x": 33
    49        }
    50      ]
    51    }
    52  ],
    53  "tests": [
    54    {
    55      "description": "DeleteMany with hint string unsupported (client-side error)",
    56      "operations": [
    57        {
    58          "object": "collection0",
    59          "name": "deleteMany",
    60          "arguments": {
    61            "filter": {
    62              "_id": {
    63                "$gt": 1
    64              }
    65            },
    66            "hint": "_id_"
    67          },
    68          "expectError": {
    69            "isError": true
    70          }
    71        }
    72      ],
    73      "expectEvents": [
    74        {
    75          "client": "client0",
    76          "events": []
    77        }
    78      ],
    79      "outcome": [
    80        {
    81          "collectionName": "DeleteMany_hint",
    82          "databaseName": "crud-v2",
    83          "documents": [
    84            {
    85              "_id": 1,
    86              "x": 11
    87            },
    88            {
    89              "_id": 2,
    90              "x": 22
    91            },
    92            {
    93              "_id": 3,
    94              "x": 33
    95            }
    96          ]
    97        }
    98      ]
    99    },
   100    {
   101      "description": "DeleteMany with hint document unsupported (client-side error)",
   102      "operations": [
   103        {
   104          "object": "collection0",
   105          "name": "deleteMany",
   106          "arguments": {
   107            "filter": {
   108              "_id": {
   109                "$gt": 1
   110              }
   111            },
   112            "hint": {
   113              "_id": 1
   114            }
   115          },
   116          "expectError": {
   117            "isError": true
   118          }
   119        }
   120      ],
   121      "expectEvents": [
   122        {
   123          "client": "client0",
   124          "events": []
   125        }
   126      ],
   127      "outcome": [
   128        {
   129          "collectionName": "DeleteMany_hint",
   130          "databaseName": "crud-v2",
   131          "documents": [
   132            {
   133              "_id": 1,
   134              "x": 11
   135            },
   136            {
   137              "_id": 2,
   138              "x": 22
   139            },
   140            {
   141              "_id": 3,
   142              "x": 33
   143            }
   144          ]
   145        }
   146      ]
   147    }
   148  ]
   149}

View as plain text