...

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

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

     1runOn:
     2  - minServerVersion: "4.1.10"
     3database_name: &database_name "default"
     4collection_name: &collection_name "default"
     5
     6data: []
     7tests:
     8  - description: "create is OK"
     9    clientOptions:
    10      autoEncryptOpts:
    11        kmsProviders:
    12          local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}}
    13    operations:
    14    # Drop to remove a collection that may exist from previous test runs.
    15    - name: dropCollection
    16      object: database
    17      arguments:
    18        collection: "unencryptedCollection"
    19    - name: createCollection
    20      object: database
    21      arguments:
    22        collection: "unencryptedCollection"
    23        validator:
    24          unencrypted_string: "foo"
    25    - name: assertCollectionExists
    26      object: testRunner
    27      arguments:
    28        database: *database_name
    29        collection: "unencryptedCollection"
    30  - description: "createIndexes is OK"
    31    clientOptions:
    32      autoEncryptOpts:
    33        kmsProviders:
    34          local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}}
    35    operations:
    36    # Drop to remove a collection that may exist from previous test runs.
    37    - name: dropCollection
    38      object: database
    39      arguments:
    40        collection: "unencryptedCollection"
    41    - name: createCollection
    42      object: database
    43      arguments:
    44        collection: "unencryptedCollection"
    45    - name: runCommand
    46      object: database
    47      arguments:
    48        command:
    49          createIndexes: "unencryptedCollection"
    50          indexes:
    51            - name: "name"
    52              key: { name: 1 }
    53    - name: assertIndexExists
    54      object: testRunner
    55      arguments:
    56        database: *database_name
    57        collection: "unencryptedCollection"
    58        index: name

View as plain text