Debian Codegraph @

testdata/client-side-encryption/legacy/fle2v2-Rangev2-WrongType.yml

raw symbols SCIP
1 # Test correctness results.
2 # Does not include command monitoring expectations or outcome assertions to make tests more readable.
3
4 # Requires libmongocrypt 1.8.0.
5 runOn:
6 - minServerVersion: "8.0.0"
7 # Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol.
8 # FLE 2 Encrypted collections are not supported on standalone.
9 topology: [ "replicaset", "sharded", "load-balanced" ]
10 maxServerVersion: "8.99.99"
11 database_name: &database_name "default"
12 collection_name: &collection_name "default"
13 data: []
14 encrypted_fields: &encrypted_fields { 'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedInt', 'bsonType': 'int', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberLong': '1'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$numberInt': '0'}, 'max': {'$numberInt': '200'}}}]}
15 key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ]
16 tests:
17 - description: "Wrong type: Insert Double"
18 clientOptions:
19 autoEncryptOpts:
20 kmsProviders:
21 local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}}
22 operations:
23 - name: insertOne
24 arguments: { document: { _id: 0, encryptedInt: { $numberDouble: "0" }} }
25 result:
26 # Expect an error from mongocryptd.
27 errorContains: "cannot encrypt element"
28
29 - description: "Wrong type: Find Double"
30 clientOptions:
31 autoEncryptOpts:
32 kmsProviders:
33 local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}}
34 operations:
35 - name: insertOne
36 arguments: { document: { _id: 0, encryptedInt: { $numberInt: "0" }} }
37 - name: find
38 arguments:
39 filter: { encryptedInt: { $gte: { $numberDouble: "0" } }}
40 # sort so results from range queries are ordered.
41 sort: { _id: 1 }
42 result:
43 # expect an error from libmongocrypt.
44 errorContains: "field type is not supported"