File: fle2v2-CreateCollection-OldServer.yml

package info (click to toggle)
golang-mongodb-mongo-driver 1.17.1%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 25,988 kB
  • sloc: perl: 533; ansic: 491; python: 432; sh: 327; makefile: 174
file content (61 lines) | stat: -rw-r--r-- 2,264 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Requires libmongocrypt 1.8.0.
runOn:
  - minServerVersion: "6.0.0"
    maxServerVersion: "6.3.99"
    # FLE 2 Encrypted collections are not supported on standalone.
    topology: [ "replicaset", "sharded", "load-balanced" ]
    
database_name: &database_name "default"
collection_name: &collection_name "default"

tests:
  - description: "driver returns an error if creating a QEv2 collection on unsupported server"
    clientOptions:
      autoEncryptOpts:
        kmsProviders:
          aws: {} # Credentials filled in from environment.
        encryptedFieldsMap:
          default.encryptedCollection: {
                "fields": [
                    {
                        "path": "firstName",
                        "bsonType": "string",
                        "keyId": { "$binary": { "base64": "AAAAAAAAAAAAAAAAAAAAAA==", "subType": "04" }}
                    }
                ]
            }

    operations:
      # Do an initial drop to remove collections that may exist from previous test runs.
      - name: dropCollection
        object: database
        arguments:
          collection: "encryptedCollection"
      - name: createCollection
        object: database
        arguments:
          collection: "encryptedCollection"
        result:
          errorContains: "Driver support of Queryable Encryption is incompatible with server. Upgrade server to use Queryable Encryption."
      # Assert no collections were created.
      - name: assertCollectionNotExists
        object: testRunner
        arguments:
          database: *database_name
          collection: &esc_collection_name "enxcol_.encryptedCollection.esc"
      # ecc collection is no longer created for QEv2
      - name: assertCollectionNotExists
        object: testRunner
        arguments:
          database: *database_name
          collection: &ecc_collection_name "enxcol_.encryptedCollection.ecc"
      - name: assertCollectionNotExists
        object: testRunner
        arguments:
          database: *database_name
          collection: &ecoc_collection_name "enxcol_.encryptedCollection.ecoc"
      - name: assertCollectionNotExists
        object: testRunner
        arguments:
          database: *database_name
          collection: encryptedCollection