{
  "description": "db-aggregate",
  "schemaVersion": "1.4",
  "runOnRequirements": [
    {
      "minServerVersion": "3.6.0",
      "serverless": "forbid"
    }
  ],
  "createEntities": [
    {
      "client": {
        "id": "client0",
        "observeEvents": [
          "commandStartedEvent"
        ]
      }
    },
    {
      "database": {
        "id": "database0",
        "client": "client0",
        "databaseName": "admin"
      }
    },
    {
      "collection": {
        "id": "collection0",
        "database": "database0",
        "collectionName": "crud-v2"
      }
    }
  ],
  "tests": [
    {
      "description": "Aggregate with $listLocalSessions",
      "operations": [
        {
          "object": "database0",
          "name": "aggregate",
          "arguments": {
            "pipeline": [
              {
                "$listLocalSessions": {}
              },
              {
                "$limit": 1
              },
              {
                "$addFields": {
                  "dummy": "dummy field"
                }
              },
              {
                "$project": {
                  "_id": 0,
                  "dummy": 1
                }
              }
            ]
          },
          "expectResult": [
            {
              "dummy": "dummy field"
            }
          ]
        }
      ]
    },
    {
      "description": "Aggregate with $listLocalSessions and allowDiskUse",
      "operations": [
        {
          "object": "database0",
          "name": "aggregate",
          "arguments": {
            "pipeline": [
              {
                "$listLocalSessions": {}
              },
              {
                "$limit": 1
              },
              {
                "$addFields": {
                  "dummy": "dummy field"
                }
              },
              {
                "$project": {
                  "_id": 0,
                  "dummy": 1
                }
              }
            ],
            "allowDiskUse": true
          },
          "expectResult": [
            {
              "dummy": "dummy field"
            }
          ]
        }
      ]
    }
  ]
}
