...

Text file src/go.mongodb.org/mongo-driver/testdata/collection-management/createCollection-pre_and_post_images.yml

Documentation: go.mongodb.org/mongo-driver/testdata/collection-management

     1description: "createCollection-pre_and_post_images"
     2
     3schemaVersion: "1.4"
     4
     5runOnRequirements:
     6  - minServerVersion: "6.0"
     7    serverless: forbid
     8
     9createEntities:
    10  - client:
    11      id: &client0 client0
    12      observeEvents: [ commandStartedEvent ]
    13  - database:
    14      id: &database0 database0
    15      client: *client0
    16      databaseName: &database0Name papi-tests
    17  - collection:
    18      id: &collection0 collection0
    19      database: *database0
    20      collectionName: &collection0Name test
    21
    22tests:
    23  - description: "createCollection with changeStreamPreAndPostImages enabled"
    24    operations:
    25      - name: dropCollection
    26        object: *database0
    27        arguments:
    28          collection: *collection0Name
    29      - name: createCollection
    30        object: *database0
    31        arguments:
    32          collection: *collection0Name
    33          changeStreamPreAndPostImages: { enabled: true }
    34      - name: assertCollectionExists
    35        object: testRunner
    36        arguments:
    37          databaseName: *database0Name
    38          collectionName: *collection0Name
    39    expectEvents:
    40      - client: *client0
    41        events:
    42          - commandStartedEvent:
    43              command:
    44                drop: *collection0Name
    45              databaseName: *database0Name
    46          - commandStartedEvent:
    47              command:
    48                create: *collection0Name
    49                changeStreamPreAndPostImages: { enabled: true }
    50              databaseName: *database0Name

View as plain text