...

Text file src/go.mongodb.org/mongo-driver/testdata/crud/unified/unacknowledged-findOneAndReplace-hint-clientError.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: unacknowledged-findOneAndReplace-hint-clientError
     5schemaVersion: '1.0'
     6createEntities:
     7  -
     8    client:
     9      id: &client0 client0
    10      observeEvents:
    11        - commandStartedEvent
    12  -
    13    database:
    14      id: &database0 database0
    15      client: client0
    16      databaseName: &database_name crud-v2
    17  -
    18    collection:
    19      id: &collection0 collection0
    20      database: database0
    21      collectionName: &collection_name FindOneAndReplace_hint
    22      collectionOptions:
    23        writeConcern: { w: 0 }
    24initialData:
    25  -
    26    collectionName: *collection_name
    27    databaseName: *database_name
    28    documents:
    29      -
    30        _id: 1
    31        x: 11
    32      -
    33        _id: 2
    34        x: 22
    35tests:
    36  -
    37    description: 'Unacknowledged findOneAndReplace with hint string fails with client-side error'
    38    operations:
    39      -
    40        object: *collection0
    41        name: findOneAndReplace
    42        arguments:
    43          filter: &filter
    44            _id: 1
    45          replacement: &replacement
    46            x: 33
    47          hint: _id_
    48        expectError:
    49          isError: true
    50    expectEvents:
    51      -
    52        client: *client0
    53        events: []
    54    outcome: &outcome
    55      -
    56        collectionName: *collection_name
    57        databaseName: *database_name
    58        documents:
    59          -
    60            _id: 1
    61            x: 11
    62          -
    63            _id: 2
    64            x: 22
    65  -
    66    description: 'Unacknowledged findOneAndReplace with hint document fails with client-side error'
    67    operations:
    68      -
    69        object: *collection0
    70        name: findOneAndReplace
    71        arguments:
    72          filter: *filter
    73          replacement: *replacement
    74          hint:
    75            _id: 1
    76        expectError:
    77          isError: true
    78    expectEvents:
    79      -
    80        client: *client0
    81        events: []
    82    outcome: *outcome

View as plain text