...

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

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

     1{
     2  "description": "updateMany-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": "test_updatemany_hint"
    30      }
    31    }
    32  ],
    33  "initialData": [
    34    {
    35      "collectionName": "test_updatemany_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": "UpdateMany with hint string unsupported (client-side error)",
    56      "operations": [
    57        {
    58          "object": "collection0",
    59          "name": "updateMany",
    60          "arguments": {
    61            "filter": {
    62              "_id": {
    63                "$gt": 1
    64              }
    65            },
    66            "update": {
    67              "$inc": {
    68                "x": 1
    69              }
    70            },
    71            "hint": "_id_"
    72          },
    73          "expectError": {
    74            "isError": true
    75          }
    76        }
    77      ],
    78      "expectEvents": [
    79        {
    80          "client": "client0",
    81          "events": []
    82        }
    83      ],
    84      "outcome": [
    85        {
    86          "collectionName": "test_updatemany_hint",
    87          "databaseName": "crud-v2",
    88          "documents": [
    89            {
    90              "_id": 1,
    91              "x": 11
    92            },
    93            {
    94              "_id": 2,
    95              "x": 22
    96            },
    97            {
    98              "_id": 3,
    99              "x": 33
   100            }
   101          ]
   102        }
   103      ]
   104    },
   105    {
   106      "description": "UpdateMany with hint document unsupported (client-side error)",
   107      "operations": [
   108        {
   109          "object": "collection0",
   110          "name": "updateMany",
   111          "arguments": {
   112            "filter": {
   113              "_id": {
   114                "$gt": 1
   115              }
   116            },
   117            "update": {
   118              "$inc": {
   119                "x": 1
   120              }
   121            },
   122            "hint": {
   123              "_id": 1
   124            }
   125          },
   126          "expectError": {
   127            "isError": true
   128          }
   129        }
   130      ],
   131      "expectEvents": [
   132        {
   133          "client": "client0",
   134          "events": []
   135        }
   136      ],
   137      "outcome": [
   138        {
   139          "collectionName": "test_updatemany_hint",
   140          "databaseName": "crud-v2",
   141          "documents": [
   142            {
   143              "_id": 1,
   144              "x": 11
   145            },
   146            {
   147              "_id": 2,
   148              "x": 22
   149            },
   150            {
   151              "_id": 3,
   152              "x": 33
   153            }
   154          ]
   155        }
   156      ]
   157    }
   158  ]
   159}

View as plain text