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
|
# Test auto encryption on a collection with no jsonSchema configured.
# This is a regression test for MONGOCRYPT-378/PYTHON-3188.
runOn:
- minServerVersion: "4.1.10"
database_name: &database_name "default"
collection_name: &collection_name "unencrypted"
tests:
- description: "Insert on an unencrypted collection"
clientOptions:
autoEncryptOpts:
kmsProviders:
aws: {} # Credentials filled in from environment.
operations:
- name: insertOne
arguments:
document: &doc0 { _id: 1 }
expectations:
# Auto encryption will request the collection info.
- command_started_event:
command:
listCollections: 1
filter:
name: *collection_name
command_name: listCollections
- command_started_event:
command:
insert: *collection_name
documents:
- *doc0
ordered: true
command_name: insert
outcome:
collection:
# Outcome is checked using a separate MongoClient without auto encryption.
data:
- *doc0
|