...

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

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

     1description: "modifyCollection-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: "modifyCollection to 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: false }
    34      - name: assertCollectionExists
    35        object: testRunner
    36        arguments:
    37          databaseName: *database0Name
    38          collectionName: *collection0Name
    39      - name: modifyCollection
    40        object: *database0
    41        arguments:
    42          collection: *collection0Name
    43          changeStreamPreAndPostImages: { enabled: true }
    44    expectEvents:
    45      - client: *client0
    46        events:
    47          - commandStartedEvent:
    48              command:
    49                drop: *collection0Name
    50              databaseName: *database0Name
    51          - commandStartedEvent:
    52              command:
    53                create: *collection0Name
    54                changeStreamPreAndPostImages: { enabled: false }
    55          - commandStartedEvent:
    56              command:
    57                collMod: *collection0Name
    58                changeStreamPreAndPostImages: { enabled: true }

View as plain text