Skip to content

Commit 9e770b5

Browse files
authored
DRIVERS-2524 assert collections are not created on unsupported server (#1428)
1 parent 2a51e98 commit 9e770b5

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

source/client-side-encryption/tests/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
}

source/client-side-encryption/tests/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

0 commit comments

Comments
 (0)