...

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

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

     1{
     2  "description": "modifyCollection-pre_and_post_images",
     3  "schemaVersion": "1.4",
     4  "runOnRequirements": [
     5    {
     6      "minServerVersion": "6.0",
     7      "serverless": "forbid"
     8    }
     9  ],
    10  "createEntities": [
    11    {
    12      "client": {
    13        "id": "client0",
    14        "observeEvents": [
    15          "commandStartedEvent"
    16        ]
    17      }
    18    },
    19    {
    20      "database": {
    21        "id": "database0",
    22        "client": "client0",
    23        "databaseName": "papi-tests"
    24      }
    25    },
    26    {
    27      "collection": {
    28        "id": "collection0",
    29        "database": "database0",
    30        "collectionName": "test"
    31      }
    32    }
    33  ],
    34  "tests": [
    35    {
    36      "description": "modifyCollection to changeStreamPreAndPostImages enabled",
    37      "operations": [
    38        {
    39          "name": "dropCollection",
    40          "object": "database0",
    41          "arguments": {
    42            "collection": "test"
    43          }
    44        },
    45        {
    46          "name": "createCollection",
    47          "object": "database0",
    48          "arguments": {
    49            "collection": "test",
    50            "changeStreamPreAndPostImages": {
    51              "enabled": false
    52            }
    53          }
    54        },
    55        {
    56          "name": "assertCollectionExists",
    57          "object": "testRunner",
    58          "arguments": {
    59            "databaseName": "papi-tests",
    60            "collectionName": "test"
    61          }
    62        },
    63        {
    64          "name": "modifyCollection",
    65          "object": "database0",
    66          "arguments": {
    67            "collection": "test",
    68            "changeStreamPreAndPostImages": {
    69              "enabled": true
    70            }
    71          }
    72        }
    73      ],
    74      "expectEvents": [
    75        {
    76          "client": "client0",
    77          "events": [
    78            {
    79              "commandStartedEvent": {
    80                "command": {
    81                  "drop": "test"
    82                },
    83                "databaseName": "papi-tests"
    84              }
    85            },
    86            {
    87              "commandStartedEvent": {
    88                "command": {
    89                  "create": "test",
    90                  "changeStreamPreAndPostImages": {
    91                    "enabled": false
    92                  }
    93                }
    94              }
    95            },
    96            {
    97              "commandStartedEvent": {
    98                "command": {
    99                  "collMod": "test",
   100                  "changeStreamPreAndPostImages": {
   101                    "enabled": true
   102                  }
   103                }
   104              }
   105            }
   106          ]
   107        }
   108      ]
   109    }
   110  ]
   111}

View as plain text