...

Text file src/go.mongodb.org/mongo-driver/testdata/unified-test-format/valid-pass/collectionData-createOptions.json

Documentation: go.mongodb.org/mongo-driver/testdata/unified-test-format/valid-pass

     1{
     2  "description": "collectionData-createOptions",
     3  "schemaVersion": "1.9",
     4  "runOnRequirements": [
     5    {
     6      "minServerVersion": "3.6",
     7      "serverless": "forbid"
     8    }
     9  ],
    10  "createEntities": [
    11    {
    12      "client": {
    13        "id": "client0"
    14      }
    15    },
    16    {
    17      "database": {
    18        "id": "database0",
    19        "client": "client0",
    20        "databaseName": "database0"
    21      }
    22    },
    23    {
    24      "collection": {
    25        "id": "collection0",
    26        "database": "database0",
    27        "collectionName": "coll0"
    28      }
    29    }
    30  ],
    31  "initialData": [
    32    {
    33      "collectionName": "coll0",
    34      "databaseName": "database0",
    35      "createOptions": {
    36        "capped": true,
    37        "size": 4096
    38      },
    39      "documents": [
    40        {
    41          "_id": 1,
    42          "x": 11
    43        }
    44      ]
    45    }
    46  ],
    47  "tests": [
    48    {
    49      "description": "collection is created with the correct options",
    50      "operations": [
    51        {
    52          "object": "collection0",
    53          "name": "aggregate",
    54          "arguments": {
    55            "pipeline": [
    56              {
    57                "$collStats": {
    58                  "storageStats": {}
    59                }
    60              },
    61              {
    62                "$project": {
    63                  "capped": "$storageStats.capped",
    64                  "maxSize": "$storageStats.maxSize"
    65                }
    66              }
    67            ]
    68          },
    69          "expectResult": [
    70            {
    71              "capped": true,
    72              "maxSize": 4096
    73            }
    74          ]
    75        }
    76      ]
    77    }
    78  ]
    79}

View as plain text