...

Text file src/go.mongodb.org/mongo-driver/testdata/sessions/snapshot-sessions-not-supported-client-error.yml

Documentation: go.mongodb.org/mongo-driver/testdata/sessions

     1description: snapshot-sessions-not-supported-client-error
     2
     3schemaVersion: "1.0"
     4
     5runOnRequirements:
     6  - minServerVersion: "3.6"
     7    maxServerVersion: "4.4.99"
     8
     9createEntities:
    10  - client:
    11      id: &client0 client0
    12      observeEvents: [ commandStartedEvent, commandFailedEvent ]
    13  - database:
    14      id: &database0Name database0
    15      client: *client0
    16      databaseName: *database0Name
    17  - collection:
    18      id: &collection0Name collection0
    19      database: *database0Name
    20      collectionName: *collection0Name
    21  - session:
    22      id: session0
    23      client: client0
    24      sessionOptions:
    25        snapshot: true
    26
    27initialData:
    28  - collectionName: *collection0Name
    29    databaseName: *database0Name
    30    documents:
    31      - { _id: 1, x: 11 }
    32
    33tests:
    34- description: Client error on find with snapshot
    35  operations:
    36  - name: find
    37    object: collection0
    38    arguments:
    39      session: session0
    40      filter: {}
    41    expectError:
    42      isClientError: true
    43      errorContains: Snapshot reads require MongoDB 5.0 or later
    44  expectEvents:
    45    - client: *client0
    46      events: []
    47
    48- description: Client error on aggregate with snapshot
    49  operations:
    50  - name: aggregate
    51    object: collection0
    52    arguments:
    53      session: session0
    54      pipeline: []
    55    expectError:
    56      isClientError: true
    57      errorContains: Snapshot reads require MongoDB 5.0 or later
    58  expectEvents:
    59    - client: *client0
    60      events: []
    61
    62- description: Client error on distinct with snapshot
    63  operations:
    64  - name: distinct
    65    object: collection0
    66    arguments:
    67      fieldName: x
    68      filter: {}
    69      session: session0
    70    expectError:
    71      isClientError: true
    72      errorContains: Snapshot reads require MongoDB 5.0 or later
    73  expectEvents:
    74    - client: *client0
    75      events: []

View as plain text