...

Text file src/go.mongodb.org/mongo-driver/testdata/client-side-encryption/legacy/noSchema.yml

Documentation: go.mongodb.org/mongo-driver/testdata/client-side-encryption/legacy

     1# Test auto encryption on a collection with no jsonSchema configured.
     2# This is a regression test for MONGOCRYPT-378/PYTHON-3188.
     3runOn:
     4  - minServerVersion: "4.1.10"
     5database_name: &database_name "default"
     6collection_name: &collection_name "unencrypted"
     7
     8tests:
     9  - description: "Insert on an unencrypted collection"
    10    clientOptions:
    11      autoEncryptOpts:
    12        kmsProviders:
    13          aws: {} # Credentials filled in from environment.
    14    operations:
    15      - name: insertOne
    16        arguments:
    17          document: &doc0 { _id: 1 }
    18    expectations:
    19      # Auto encryption will request the collection info.
    20      - command_started_event:
    21          command:
    22            listCollections: 1
    23            filter:
    24              name: *collection_name
    25          command_name: listCollections
    26      - command_started_event:
    27          command:
    28            insert: *collection_name
    29            documents:
    30              - *doc0
    31            ordered: true
    32          command_name: insert
    33    outcome:
    34      collection:
    35        # Outcome is checked using a separate MongoClient without auto encryption.
    36        data:
    37          - *doc0

View as plain text