Skip to content

Commit 56e75b2

Browse files
GODRIVER-3195 Sync updated QE Range tests (#1789) [v1] (#1790)
Co-authored-by: Steven Silvester <[email protected]>
1 parent 783cc6c commit 56e75b2

8 files changed

+61
-27
lines changed

testdata/client-side-encryption/legacy/fle2v2-CreateCollection-OldServer.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,38 @@
5555
"result": {
5656
"errorContains": "Driver support of Queryable Encryption is incompatible with server. Upgrade server to use Queryable Encryption."
5757
}
58+
},
59+
{
60+
"name": "assertCollectionNotExists",
61+
"object": "testRunner",
62+
"arguments": {
63+
"database": "default",
64+
"collection": "enxcol_.encryptedCollection.esc"
65+
}
66+
},
67+
{
68+
"name": "assertCollectionNotExists",
69+
"object": "testRunner",
70+
"arguments": {
71+
"database": "default",
72+
"collection": "enxcol_.encryptedCollection.ecc"
73+
}
74+
},
75+
{
76+
"name": "assertCollectionNotExists",
77+
"object": "testRunner",
78+
"arguments": {
79+
"database": "default",
80+
"collection": "enxcol_.encryptedCollection.ecoc"
81+
}
82+
},
83+
{
84+
"name": "assertCollectionNotExists",
85+
"object": "testRunner",
86+
"arguments": {
87+
"database": "default",
88+
"collection": "encryptedCollection"
89+
}
5890
}
5991
]
6092
}

testdata/client-side-encryption/legacy/fle2v2-CreateCollection-OldServer.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,25 @@ tests:
3737
collection: "encryptedCollection"
3838
result:
3939
errorContains: "Driver support of Queryable Encryption is incompatible with server. Upgrade server to use Queryable Encryption."
40+
# Assert no collections were created.
41+
- name: assertCollectionNotExists
42+
object: testRunner
43+
arguments:
44+
database: *database_name
45+
collection: &esc_collection_name "enxcol_.encryptedCollection.esc"
46+
# ecc collection is no longer created for QEv2
47+
- name: assertCollectionNotExists
48+
object: testRunner
49+
arguments:
50+
database: *database_name
51+
collection: &ecc_collection_name "enxcol_.encryptedCollection.ecc"
52+
- name: assertCollectionNotExists
53+
object: testRunner
54+
arguments:
55+
database: *database_name
56+
collection: &ecoc_collection_name "enxcol_.encryptedCollection.ecoc"
57+
- name: assertCollectionNotExists
58+
object: testRunner
59+
arguments:
60+
database: *database_name
61+
collection: encryptedCollection

testdata/client-side-encryption/legacy/fle2v2-CreateCollection.json

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,6 @@
157157
"command": {
158158
"create": "encryptedCollection",
159159
"encryptedFields": {
160-
"escCollection": null,
161-
"ecocCollection": null,
162-
"eccCollection": null,
163160
"fields": [
164161
{
165162
"path": "firstName",
@@ -342,9 +339,6 @@
342339
"command": {
343340
"create": "encryptedCollection",
344341
"encryptedFields": {
345-
"escCollection": null,
346-
"ecocCollection": null,
347-
"eccCollection": null,
348342
"fields": [
349343
{
350344
"path": "firstName",
@@ -850,9 +844,6 @@
850844
"command": {
851845
"create": "encryptedCollection",
852846
"encryptedFields": {
853-
"escCollection": null,
854-
"ecocCollection": null,
855-
"eccCollection": null,
856847
"fields": [
857848
{
858849
"path": "firstName",
@@ -1047,9 +1038,6 @@
10471038
"command": {
10481039
"create": "encryptedCollection",
10491040
"encryptedFields": {
1050-
"escCollection": null,
1051-
"ecocCollection": null,
1052-
"eccCollection": null,
10531041
"fields": [
10541042
{
10551043
"path": "firstName",
@@ -1366,9 +1354,6 @@
13661354
"command": {
13671355
"create": "encryptedCollection",
13681356
"encryptedFields": {
1369-
"escCollection": null,
1370-
"ecocCollection": null,
1371-
"eccCollection": null,
13721357
"fields": [
13731358
{
13741359
"path": "firstName",
@@ -1634,9 +1619,6 @@
16341619
"command": {
16351620
"create": "encryptedCollection",
16361621
"encryptedFields": {
1637-
"escCollection": null,
1638-
"ecocCollection": null,
1639-
"eccCollection": null,
16401622
"fields": [
16411623
{
16421624
"path": "firstName",

testdata/client-side-encryption/legacy/fle2v2-CreateCollection.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,6 @@ tests:
100100
command:
101101
create: *encrypted_collection_name
102102
encryptedFields: &encrypted_fields_expectation {
103-
# Expect state collections are not included in the encryptedFields sent to the server.
104-
"escCollection": null,
105-
"ecocCollection": null,
106-
"eccCollection": null,
107103
"fields": [
108104
{
109105
"path": "firstName",

testdata/client-side-encryption/legacy/fle2v2-MissingKey.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"key_vault_data": [],
5555
"tests": [
5656
{
57-
"description": "FLE2 encrypt fails with mising key",
57+
"description": "FLE2 encrypt fails with missing key",
5858
"clientOptions": {
5959
"autoEncryptOpts": {
6060
"kmsProviders": {
@@ -85,7 +85,7 @@
8585
]
8686
},
8787
{
88-
"description": "FLE2 decrypt fails with mising key",
88+
"description": "FLE2 decrypt fails with missing key",
8989
"clientOptions": {
9090
"autoEncryptOpts": {
9191
"kmsProviders": {

testdata/client-side-encryption/legacy/fle2v2-MissingKey.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ data: [
1919
encrypted_fields: {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedIndexed', 'bsonType': 'string', 'queries': {'queryType': 'equality', 'contention': {'$numberLong': '0'}}}, {'keyId': {'$binary': {'base64': 'q83vqxI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedUnindexed', 'bsonType': 'string'}]}
2020
key_vault_data: []
2121
tests:
22-
- description: "FLE2 encrypt fails with mising key"
22+
- description: "FLE2 encrypt fails with missing key"
2323
clientOptions:
2424
autoEncryptOpts:
2525
kmsProviders:
@@ -30,7 +30,7 @@ tests:
3030
document: { _id: 1, encryptedIndexed: "123" }
3131
result:
3232
errorContains: "not all keys requested were satisfied"
33-
- description: "FLE2 decrypt fails with mising key"
33+
- description: "FLE2 decrypt fails with missing key"
3434
clientOptions:
3535
autoEncryptOpts:
3636
kmsProviders:

testdata/client-side-encryption/legacy/fle2v2-Rangev2-Compact.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"replicaset",
77
"sharded",
88
"load-balanced"
9-
]
9+
],
10+
"serverless": "forbid"
1011
}
1112
],
1213
"database_name": "default",

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ runOn:
33
- minServerVersion: "8.0.0" # Require range v2 support on server.
44
# FLE 2 Encrypted collections are not supported on standalone.
55
topology: [ "replicaset", "sharded", "load-balanced" ]
6+
serverless: forbid # Skip on serverless until CLOUDP-267864 is resolved.
67
database_name: "default"
78
collection_name: &collection_name "default"
89
data: []

0 commit comments

Comments
 (0)