...

Text file src/go.mongodb.org/mongo-driver/testdata/unified-test-format/valid-pass/matches-lte-operator.yml

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

     1description: matches-lte-operator
     2
     3schemaVersion: '1.5'
     4
     5createEntities:
     6  - client:
     7      id: &client0 client0
     8      observeEvents: [ commandStartedEvent ]
     9  - database:
    10      id: &database0 database0
    11      client: *client0
    12      databaseName: &database0Name database0Name
    13  - collection:
    14      id: &collection0 collection0
    15      database: *database0
    16      collectionName: &collection0Name coll0
    17
    18initialData:
    19  - collectionName: *collection0Name
    20    databaseName: *database0Name
    21    documents: []
    22
    23tests:
    24  - description: special lte matching operator
    25    operations:
    26      - name: insertOne
    27        object: *collection0
    28        arguments:
    29          document: { _id : 1, y: 1 }
    30    expectEvents:
    31      - client: *client0
    32        events:
    33          - commandStartedEvent:
    34              command:
    35                insert: *collection0Name
    36                documents:
    37                  # We can make exact assertions here but we use the $$lte operator to ensure drivers support it.
    38                  - { _id: { $$lte: 1 }, y: { $$lte: 2 } }
    39              commandName: insert
    40              databaseName: *database0Name

View as plain text