From fe057cf5776348e1c2f3132fd2a395be1679a7e4 Mon Sep 17 00:00:00 2001 From: Shane Harvey Date: Wed, 20 Apr 2022 12:01:26 -0700 Subject: [PATCH] PYTHON-3220 Add CSFLE spec test for auto encryption on a collection with no jsonSchema --- .../client-side-encryption/spec/noSchema.json | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 test/client-side-encryption/spec/noSchema.json diff --git a/test/client-side-encryption/spec/noSchema.json b/test/client-side-encryption/spec/noSchema.json new file mode 100644 index 000000000..095434f88 --- /dev/null +++ b/test/client-side-encryption/spec/noSchema.json @@ -0,0 +1,67 @@ +{ + "runOn": [ + { + "minServerVersion": "4.1.10" + } + ], + "database_name": "default", + "collection_name": "unencrypted", + "tests": [ + { + "description": "Insert on an unencrypted collection", + "clientOptions": { + "autoEncryptOpts": { + "kmsProviders": { + "aws": {} + } + } + }, + "operations": [ + { + "name": "insertOne", + "arguments": { + "document": { + "_id": 1 + } + } + } + ], + "expectations": [ + { + "command_started_event": { + "command": { + "listCollections": 1, + "filter": { + "name": "unencrypted" + } + }, + "command_name": "listCollections" + } + }, + { + "command_started_event": { + "command": { + "insert": "unencrypted", + "documents": [ + { + "_id": 1 + } + ], + "ordered": true + }, + "command_name": "insert" + } + } + ], + "outcome": { + "collection": { + "data": [ + { + "_id": 1 + } + ] + } + } + } + ] +}