...

Text file src/go.mongodb.org/mongo-driver/testdata/crud/unified/db-aggregate.json

Documentation: go.mongodb.org/mongo-driver/testdata/crud/unified

     1{
     2  "description": "db-aggregate",
     3  "schemaVersion": "1.4",
     4  "runOnRequirements": [
     5    {
     6      "minServerVersion": "3.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": "admin"
    24      }
    25    },
    26    {
    27      "collection": {
    28        "id": "collection0",
    29        "database": "database0",
    30        "collectionName": "crud-v2"
    31      }
    32    }
    33  ],
    34  "tests": [
    35    {
    36      "description": "Aggregate with $listLocalSessions",
    37      "operations": [
    38        {
    39          "object": "database0",
    40          "name": "aggregate",
    41          "arguments": {
    42            "pipeline": [
    43              {
    44                "$listLocalSessions": {}
    45              },
    46              {
    47                "$limit": 1
    48              },
    49              {
    50                "$addFields": {
    51                  "dummy": "dummy field"
    52                }
    53              },
    54              {
    55                "$project": {
    56                  "_id": 0,
    57                  "dummy": 1
    58                }
    59              }
    60            ]
    61          },
    62          "expectResult": [
    63            {
    64              "dummy": "dummy field"
    65            }
    66          ]
    67        }
    68      ]
    69    },
    70    {
    71      "description": "Aggregate with $listLocalSessions and allowDiskUse",
    72      "operations": [
    73        {
    74          "object": "database0",
    75          "name": "aggregate",
    76          "arguments": {
    77            "pipeline": [
    78              {
    79                "$listLocalSessions": {}
    80              },
    81              {
    82                "$limit": 1
    83              },
    84              {
    85                "$addFields": {
    86                  "dummy": "dummy field"
    87                }
    88              },
    89              {
    90                "$project": {
    91                  "_id": 0,
    92                  "dummy": 1
    93                }
    94              }
    95            ],
    96            "allowDiskUse": true
    97          },
    98          "expectResult": [
    99            {
   100              "dummy": "dummy field"
   101            }
   102          ]
   103        }
   104      ]
   105    }
   106  ]
   107}

View as plain text