...

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

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

     1{
     2  "description": "bulkWrite-delete-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": "BulkWrite_delete_hint"
    30      }
    31    }
    32  ],
    33  "initialData": [
    34    {
    35      "collectionName": "BulkWrite_delete_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          "_id": 4,
    52          "x": 44
    53        }
    54      ]
    55    }
    56  ],
    57  "tests": [
    58    {
    59      "description": "BulkWrite deleteOne with hints unsupported (client-side error)",
    60      "operations": [
    61        {
    62          "object": "collection0",
    63          "name": "bulkWrite",
    64          "arguments": {
    65            "requests": [
    66              {
    67                "deleteOne": {
    68                  "filter": {
    69                    "_id": 1
    70                  },
    71                  "hint": "_id_"
    72                }
    73              },
    74              {
    75                "deleteOne": {
    76                  "filter": {
    77                    "_id": 2
    78                  },
    79                  "hint": {
    80                    "_id": 1
    81                  }
    82                }
    83              }
    84            ],
    85            "ordered": true
    86          },
    87          "expectError": {
    88            "isError": true
    89          }
    90        }
    91      ],
    92      "expectEvents": [
    93        {
    94          "client": "client0",
    95          "events": []
    96        }
    97      ],
    98      "outcome": [
    99        {
   100          "collectionName": "BulkWrite_delete_hint",
   101          "databaseName": "crud-v2",
   102          "documents": [
   103            {
   104              "_id": 1,
   105              "x": 11
   106            },
   107            {
   108              "_id": 2,
   109              "x": 22
   110            },
   111            {
   112              "_id": 3,
   113              "x": 33
   114            },
   115            {
   116              "_id": 4,
   117              "x": 44
   118            }
   119          ]
   120        }
   121      ]
   122    },
   123    {
   124      "description": "BulkWrite deleteMany with hints unsupported (client-side error)",
   125      "operations": [
   126        {
   127          "object": "collection0",
   128          "name": "bulkWrite",
   129          "arguments": {
   130            "requests": [
   131              {
   132                "deleteMany": {
   133                  "filter": {
   134                    "_id": {
   135                      "$lt": 3
   136                    }
   137                  },
   138                  "hint": "_id_"
   139                }
   140              },
   141              {
   142                "deleteMany": {
   143                  "filter": {
   144                    "_id": {
   145                      "$gte": 4
   146                    }
   147                  },
   148                  "hint": {
   149                    "_id": 1
   150                  }
   151                }
   152              }
   153            ],
   154            "ordered": true
   155          },
   156          "expectError": {
   157            "isError": true
   158          }
   159        }
   160      ],
   161      "expectEvents": [
   162        {
   163          "client": "client0",
   164          "events": []
   165        }
   166      ],
   167      "outcome": [
   168        {
   169          "collectionName": "BulkWrite_delete_hint",
   170          "databaseName": "crud-v2",
   171          "documents": [
   172            {
   173              "_id": 1,
   174              "x": 11
   175            },
   176            {
   177              "_id": 2,
   178              "x": 22
   179            },
   180            {
   181              "_id": 3,
   182              "x": 33
   183            },
   184            {
   185              "_id": 4,
   186              "x": 44
   187            }
   188          ]
   189        }
   190      ]
   191    }
   192  ]
   193}

View as plain text