...

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

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

     1# Requires libmongocrypt 1.8.0.
     2runOn:
     3  - minServerVersion: "6.0.0"
     4    maxServerVersion: "6.3.99"
     5    # FLE 2 Encrypted collections are not supported on standalone.
     6    topology: [ "replicaset", "sharded", "load-balanced" ]
     7    
     8database_name: &database_name "default"
     9collection_name: &collection_name "default"
    10
    11tests:
    12  - description: "driver returns an error if creating a QEv2 collection on unsupported server"
    13    clientOptions:
    14      autoEncryptOpts:
    15        kmsProviders:
    16          aws: {} # Credentials filled in from environment.
    17        encryptedFieldsMap:
    18          default.encryptedCollection: {
    19                "fields": [
    20                    {
    21                        "path": "firstName",
    22                        "bsonType": "string",
    23                        "keyId": { "$binary": { "base64": "AAAAAAAAAAAAAAAAAAAAAA==", "subType": "04" }}
    24                    }
    25                ]
    26            }
    27
    28    operations:
    29      # Do an initial drop to remove collections that may exist from previous test runs.
    30      - name: dropCollection
    31        object: database
    32        arguments:
    33          collection: "encryptedCollection"
    34      - name: createCollection
    35        object: database
    36        arguments:
    37          collection: "encryptedCollection"
    38        result:
    39          errorContains: "Driver support of Queryable Encryption is incompatible with server. Upgrade server to use Queryable Encryption."

View as plain text