Skip to content

Commit c422c62

Browse files
committed
fix badQueries id test
1 parent 2356bce commit c422c62

File tree

2 files changed

+46
-2
lines changed

2 files changed

+46
-2
lines changed

source/client-side-encryption/tests/unified/badQueries.json

Lines changed: 35 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/client-side-encryption/tests/unified/badQueries.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ createEntities:
1919
id: "coll"
2020
database: "db"
2121
collectionName: default
22+
- collection:
23+
id: coll_with_encrypted_id
24+
database: db
25+
collectionName: coll_with_encrypted_id
2226
initialData:
2327
- databaseName: default
2428
collectionName: default
@@ -38,6 +42,12 @@ initialData:
3842
'encrypted_string_equivalent': {'encrypt': {'keyId': ['$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==',
3943
'subType': '04'}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}},
4044
'bsonType': 'object'}
45+
- databaseName: default
46+
collectionName: coll_with_encrypted_id
47+
documents: []
48+
createOptions:
49+
validator:
50+
$jsonSchema: {'properties': {'_id': {'encrypt': {'keyId': [{'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType': '04'}}], 'bsonType': 'string', 'algorithm': 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'}}}}
4151
- databaseName: keyvault
4252
collectionName: datakeys
4353
documents: [{'status': 1, '_id': {'$binary': {'base64': 'AAAAAAAAAAAAAAAAAAAAAA==',
@@ -499,7 +509,7 @@ tests:
499509
- name: insertOne
500510
arguments:
501511
document: {_id: 1}
502-
object: "coll"
512+
object: "coll_with_encrypted_id"
503513
expectError:
504514
errorContains: "Invalid schema containing the 'encrypt' keyword."
505515
- description: "an insert with an array value for an encrypted field fails"

0 commit comments

Comments
 (0)