...

Text file src/go.mongodb.org/mongo-driver/testdata/crud/unified/unacknowledged-updateOne-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-updateOne-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 UpdateOne_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 updateOne with hint string fails with client-side error'
    38    operations:
    39      -
    40        object: *collection0
    41        name: updateOne
    42        arguments:
    43          filter: &filter
    44            _id:
    45              $gt: 1
    46          update: &update
    47            $inc:
    48              x: 1
    49          hint: _id_
    50        expectError:
    51          isError: true
    52    expectEvents:
    53      -
    54        client: *client0
    55        events: []
    56    outcome: &outcome
    57      -
    58        collectionName: *collection_name
    59        databaseName: *database_name
    60        documents:
    61          -
    62            _id: 1
    63            x: 11
    64          -
    65            _id: 2
    66            x: 22
    67  -
    68    description: 'Unacknowledged updateOne with hint document fails with client-side error'
    69    operations:
    70      -
    71        object: *collection0
    72        name: updateOne
    73        arguments:
    74          filter: *filter
    75          update: *update
    76          hint:
    77            _id: 1
    78        expectError:
    79          isError: true
    80    expectEvents:
    81      -
    82        client: *client0
    83        events: []
    84    outcome: *outcome

View as plain text