...

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

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

     1# This file was created automatically using mongodb-spec-converter.
     2# Please review the generated file, then remove this notice.
     3
     4description: db-aggregate
     5schemaVersion: '1.4'
     6runOnRequirements:
     7  -
     8    minServerVersion: 3.6.0
     9    # serverless does not support either of the current database-level aggregation stages ($listLocalSessions and
    10    # $currentOp)
    11    serverless: forbid
    12createEntities:
    13  -
    14    client:
    15      id: &client0 client0
    16      observeEvents:
    17        - commandStartedEvent
    18  -
    19    database:
    20      id: &database0 database0
    21      client: client0
    22      databaseName: &database_name admin
    23  -
    24    collection:
    25      id: &collection0 collection0
    26      database: database0
    27      collectionName: &collection_name crud-v2
    28tests:
    29  -
    30    description: 'Aggregate with $listLocalSessions'
    31    operations:
    32      -
    33        object: *database0
    34        name: aggregate
    35        arguments:
    36          pipeline:
    37            -
    38              $listLocalSessions: {  }
    39            -
    40              $limit: 1
    41            -
    42              $addFields:
    43                dummy: 'dummy field'
    44            -
    45              $project:
    46                _id: 0
    47                dummy: 1
    48        expectResult:
    49          -
    50            dummy: 'dummy field'
    51  -
    52    description: 'Aggregate with $listLocalSessions and allowDiskUse'
    53    operations:
    54      -
    55        object: *database0
    56        name: aggregate
    57        arguments:
    58          pipeline:
    59            -
    60              $listLocalSessions: {  }
    61            -
    62              $limit: 1
    63            -
    64              $addFields:
    65                dummy: 'dummy field'
    66            -
    67              $project:
    68                _id: 0
    69                dummy: 1
    70          allowDiskUse: true
    71        expectResult:
    72          -
    73            dummy: 'dummy field'

View as plain text