...

Text file src/go.mongodb.org/mongo-driver/testdata/change-streams/change-streams-clusterTime.yml

Documentation: go.mongodb.org/mongo-driver/testdata/change-streams

     1description: "change-streams-clusterTime"
     2schemaVersion: "1.4"
     3createEntities:
     4  - client:
     5      id: &client0 client0
     6      useMultipleMongoses: false
     7  - database:
     8      id: &database0 database0
     9      client: *client0
    10      databaseName: *database0
    11  - collection:
    12      id: &collection0 collection0
    13      database: *database0
    14      collectionName: *collection0
    15
    16runOnRequirements:
    17  - minServerVersion: "4.0.0"
    18    topologies: [ replicaset, sharded-replicaset, load-balanced, sharded ]
    19    serverless: forbid
    20
    21initialData:
    22  - collectionName: *collection0
    23    databaseName: *database0
    24    documents: []
    25
    26tests:
    27  - description: "clusterTime is present"
    28    operations:
    29      - name: createChangeStream
    30        object: *collection0
    31        arguments: { pipeline: [] }
    32        saveResultAsEntity: &changeStream0 changeStream0
    33      - name: insertOne
    34        object: *collection0
    35        arguments:
    36          document: { _id: 1 }
    37      - name: iterateUntilDocumentOrError
    38        object: *changeStream0
    39        expectResult:
    40          ns: { db: *database0, coll: *collection0 }
    41          clusterTime: { $$exists: true }

View as plain text