...

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

View as plain text