...

Text file src/go.mongodb.org/mongo-driver/testdata/crud/unified/findOneAndUpdate-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: findOneAndUpdate-hint-serverError
     5schemaVersion: '1.0'
     6runOnRequirements:
     7  -
     8    minServerVersion: 4.2.0
     9    maxServerVersion: 4.3.0
    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 findOneAndUpdate_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
    37tests:
    38  -
    39    description: 'FindOneAndUpdate with hint string unsupported (server-side error)'
    40    operations:
    41      -
    42        object: *collection0
    43        name: findOneAndUpdate
    44        arguments:
    45          filter: &filter
    46            _id: 1
    47          update: &update
    48            $inc:
    49              x: 1
    50          hint: _id_
    51        expectError:
    52          isError: true
    53    expectEvents:
    54      -
    55        client: *client0
    56        events:
    57          -
    58            commandStartedEvent:
    59              command:
    60                findAndModify: *collection_name
    61                query: *filter
    62                update: *update
    63                hint: _id_
    64    outcome: &outcome
    65      -
    66        collectionName: *collection_name
    67        databaseName: *database_name
    68        documents:
    69          -
    70            _id: 1
    71            x: 11
    72          -
    73            _id: 2
    74            x: 22
    75  -
    76    description: 'FindOneAndUpdate with hint document unsupported (server-side error)'
    77    operations:
    78      -
    79        object: *collection0
    80        name: findOneAndUpdate
    81        arguments:
    82          filter: *filter
    83          update: *update
    84          hint:
    85            _id: 1
    86        expectError:
    87          isError: true
    88    expectEvents:
    89      -
    90        client: *client0
    91        events:
    92          -
    93            commandStartedEvent:
    94              command:
    95                findAndModify: *collection_name
    96                query: *filter
    97                update: *update
    98                hint:
    99                  _id: 1
   100    outcome: *outcome

View as plain text