...

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

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

     1# This file was created automatically using mongodb-spec-converter.
     2# Please review the generated file, then remove this notice.
     3
     4description: updateMany-hint-serverError
     5schemaVersion: '1.0'
     6runOnRequirements:
     7  -
     8    minServerVersion: 3.4.0
     9    maxServerVersion: 4.1.9
    10createEntities:
    11  -
    12    client:
    13      id: &client0 client0
    14      observeEvents:
    15        - commandStartedEvent
    16  -
    17    database:
    18      id: &database0 database0
    19      client: client0
    20      databaseName: &database_name crud-v2
    21  -
    22    collection:
    23      id: &collection0 collection0
    24      database: database0
    25      collectionName: &collection_name test_updatemany_hint
    26initialData:
    27  -
    28    collectionName: *collection_name
    29    databaseName: *database_name
    30    documents:
    31      -
    32        _id: 1
    33        x: 11
    34      -
    35        _id: 2
    36        x: 22
    37      -
    38        _id: 3
    39        x: 33
    40tests:
    41  -
    42    description: 'UpdateMany with hint string unsupported (server-side error)'
    43    operations:
    44      -
    45        object: *collection0
    46        name: updateMany
    47        arguments:
    48          filter: &filter
    49            _id:
    50              $gt: 1
    51          update: &update
    52            $inc:
    53              x: 1
    54          hint: _id_
    55        expectError:
    56          isError: true
    57    expectEvents:
    58      -
    59        client: *client0
    60        events:
    61          -
    62            commandStartedEvent:
    63              command:
    64                update: *collection_name
    65                updates:
    66                  -
    67                    q: *filter
    68                    u: *update
    69                    multi: true
    70                    hint: _id_
    71                    upsert: { $$unsetOrMatches: false }
    72    outcome: &outcome
    73      -
    74        collectionName: *collection_name
    75        databaseName: *database_name
    76        documents:
    77          -
    78            _id: 1
    79            x: 11
    80          -
    81            _id: 2
    82            x: 22
    83          -
    84            _id: 3
    85            x: 33
    86  -
    87    description: 'UpdateMany with hint document unsupported (server-side error)'
    88    operations:
    89      -
    90        object: *collection0
    91        name: updateMany
    92        arguments:
    93          filter: *filter
    94          update: *update
    95          hint:
    96            _id: 1
    97        expectError:
    98          isError: true
    99    expectEvents:
   100      -
   101        client: *client0
   102        events:
   103          -
   104            commandStartedEvent:
   105              command:
   106                update: *collection_name
   107                updates:
   108                  -
   109                    q: *filter
   110                    u: *update
   111                    multi: true
   112                    hint:
   113                      _id: 1
   114                    upsert: { $$unsetOrMatches: false }
   115    outcome: *outcome

View as plain text