...

Text file src/go.mongodb.org/mongo-driver/testdata/crud/unified/bulkWrite-update-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: bulkWrite-update-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_bulkwrite_update_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
    40      -
    41        _id: 4
    42        x: 44
    43tests:
    44  -
    45    description: 'BulkWrite updateOne with update hints unsupported (server-side error)'
    46    operations:
    47      -
    48        object: *collection0
    49        name: bulkWrite
    50        arguments:
    51          requests:
    52            -
    53              updateOne:
    54                filter: &updateOne_filter
    55                  _id: 1
    56                update: &updateOne_update
    57                  $inc:
    58                    x: 1
    59                hint: &hint_string _id_
    60            -
    61              updateOne:
    62                filter: *updateOne_filter
    63                update: *updateOne_update
    64                hint: &hint_doc
    65                  _id: 1
    66          ordered: true
    67        expectError:
    68          isError: true
    69    expectEvents:
    70      -
    71        client: *client0
    72        events:
    73          -
    74            commandStartedEvent:
    75              command:
    76                update: *collection_name
    77                updates:
    78                  -
    79                    q: *updateOne_filter
    80                    u: *updateOne_update
    81                    hint: *hint_string
    82                    multi: { $$unsetOrMatches: false }
    83                    upsert: { $$unsetOrMatches: false }
    84                  -
    85                    q: *updateOne_filter
    86                    u: *updateOne_update
    87                    hint: *hint_doc
    88                    multi: { $$unsetOrMatches: false }
    89                    upsert: { $$unsetOrMatches: false }
    90                ordered: true
    91    outcome:
    92      -
    93        collectionName: *collection_name
    94        databaseName: *database_name
    95        documents:
    96          -
    97            _id: 1
    98            x: 11
    99          -
   100            _id: 2
   101            x: 22
   102          -
   103            _id: 3
   104            x: 33
   105          -
   106            _id: 4
   107            x: 44
   108  -
   109    description: 'BulkWrite updateMany with update hints unsupported (server-side error)'
   110    operations:
   111      -
   112        object: *collection0
   113        name: bulkWrite
   114        arguments:
   115          requests:
   116            -
   117              updateMany:
   118                filter: &updateMany_filter
   119                  _id:
   120                    $lt: 3
   121                update: &updateMany_update
   122                  $inc:
   123                    x: 1
   124                hint: *hint_string
   125            -
   126              updateMany:
   127                filter: *updateMany_filter
   128                update: *updateMany_update
   129                hint: *hint_doc
   130          ordered: true
   131        expectError:
   132          isError: true
   133    expectEvents:
   134      -
   135        client: *client0
   136        events:
   137          -
   138            commandStartedEvent:
   139              command:
   140                update: *collection_name
   141                updates:
   142                  -
   143                    q: *updateMany_filter
   144                    u: *updateMany_update
   145                    multi: true
   146                    hint: *hint_string
   147                    upsert: { $$unsetOrMatches: false }
   148                  -
   149                    q: *updateMany_filter
   150                    u: *updateMany_update
   151                    multi: true
   152                    hint: *hint_doc
   153                    upsert: { $$unsetOrMatches: false }
   154                ordered: true
   155    outcome:
   156      -
   157        collectionName: *collection_name
   158        databaseName: *database_name
   159        documents:
   160          -
   161            _id: 1
   162            x: 11
   163          -
   164            _id: 2
   165            x: 22
   166          -
   167            _id: 3
   168            x: 33
   169          -
   170            _id: 4
   171            x: 44
   172  -
   173    description: 'BulkWrite replaceOne with update hints unsupported (server-side error)'
   174    operations:
   175      -
   176        object: *collection0
   177        name: bulkWrite
   178        arguments:
   179          requests:
   180            -
   181              replaceOne:
   182                filter:
   183                  _id: 3
   184                replacement:
   185                  x: 333
   186                hint: *hint_string
   187            -
   188              replaceOne:
   189                filter:
   190                  _id: 4
   191                replacement:
   192                  x: 444
   193                hint: *hint_doc
   194          ordered: true
   195        expectError:
   196          isError: true
   197    expectEvents:
   198      -
   199        client: *client0
   200        events:
   201          -
   202            commandStartedEvent:
   203              command:
   204                update: *collection_name
   205                updates:
   206                  -
   207                    q:
   208                      _id: 3
   209                    u:
   210                      x: 333
   211                    hint: *hint_string
   212                    multi: { $$unsetOrMatches: false }
   213                    upsert: { $$unsetOrMatches: false }
   214                  -
   215                    q:
   216                      _id: 4
   217                    u:
   218                      x: 444
   219                    hint: *hint_doc
   220                    multi: { $$unsetOrMatches: false }
   221                    upsert: { $$unsetOrMatches: false }
   222                ordered: true
   223    outcome:
   224      -
   225        collectionName: *collection_name
   226        databaseName: *database_name
   227        documents:
   228          -
   229            _id: 1
   230            x: 11
   231          -
   232            _id: 2
   233            x: 22
   234          -
   235            _id: 3
   236            x: 33
   237          -
   238            _id: 4
   239            x: 44

View as plain text