Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GODRIVER-3195 Sync updated QE Range tests #1789

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,38 @@
"result": {
"errorContains": "Driver support of Queryable Encryption is incompatible with server. Upgrade server to use Queryable Encryption."
}
},
{
"name": "assertCollectionNotExists",
"object": "testRunner",
"arguments": {
"database": "default",
"collection": "enxcol_.encryptedCollection.esc"
}
},
{
"name": "assertCollectionNotExists",
"object": "testRunner",
"arguments": {
"database": "default",
"collection": "enxcol_.encryptedCollection.ecc"
}
},
{
"name": "assertCollectionNotExists",
"object": "testRunner",
"arguments": {
"database": "default",
"collection": "enxcol_.encryptedCollection.ecoc"
}
},
{
"name": "assertCollectionNotExists",
"object": "testRunner",
"arguments": {
"database": "default",
"collection": "encryptedCollection"
}
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,25 @@ tests:
collection: "encryptedCollection"
result:
errorContains: "Driver support of Queryable Encryption is incompatible with server. Upgrade server to use Queryable Encryption."
# Assert no collections were created.
- name: assertCollectionNotExists
object: testRunner
arguments:
database: *database_name
collection: &esc_collection_name "enxcol_.encryptedCollection.esc"
# ecc collection is no longer created for QEv2
- name: assertCollectionNotExists
object: testRunner
arguments:
database: *database_name
collection: &ecc_collection_name "enxcol_.encryptedCollection.ecc"
- name: assertCollectionNotExists
object: testRunner
arguments:
database: *database_name
collection: &ecoc_collection_name "enxcol_.encryptedCollection.ecoc"
- name: assertCollectionNotExists
object: testRunner
arguments:
database: *database_name
collection: encryptedCollection
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,6 @@
"command": {
"create": "encryptedCollection",
"encryptedFields": {
"escCollection": null,
"ecocCollection": null,
"eccCollection": null,
"fields": [
{
"path": "firstName",
Expand Down Expand Up @@ -342,9 +339,6 @@
"command": {
"create": "encryptedCollection",
"encryptedFields": {
"escCollection": null,
"ecocCollection": null,
"eccCollection": null,
"fields": [
{
"path": "firstName",
Expand Down Expand Up @@ -850,9 +844,6 @@
"command": {
"create": "encryptedCollection",
"encryptedFields": {
"escCollection": null,
"ecocCollection": null,
"eccCollection": null,
"fields": [
{
"path": "firstName",
Expand Down Expand Up @@ -1047,9 +1038,6 @@
"command": {
"create": "encryptedCollection",
"encryptedFields": {
"escCollection": null,
"ecocCollection": null,
"eccCollection": null,
"fields": [
{
"path": "firstName",
Expand Down Expand Up @@ -1366,9 +1354,6 @@
"command": {
"create": "encryptedCollection",
"encryptedFields": {
"escCollection": null,
"ecocCollection": null,
"eccCollection": null,
"fields": [
{
"path": "firstName",
Expand Down Expand Up @@ -1634,9 +1619,6 @@
"command": {
"create": "encryptedCollection",
"encryptedFields": {
"escCollection": null,
"ecocCollection": null,
"eccCollection": null,
"fields": [
{
"path": "firstName",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,6 @@ tests:
command:
create: *encrypted_collection_name
encryptedFields: &encrypted_fields_expectation {
# Expect state collections are not included in the encryptedFields sent to the server.
"escCollection": null,
"ecocCollection": null,
"eccCollection": null,
"fields": [
{
"path": "firstName",
Expand Down
4 changes: 2 additions & 2 deletions testdata/client-side-encryption/legacy/fle2v2-MissingKey.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"key_vault_data": [],
"tests": [
{
"description": "FLE2 encrypt fails with mising key",
"description": "FLE2 encrypt fails with missing key",
"clientOptions": {
"autoEncryptOpts": {
"kmsProviders": {
Expand Down Expand Up @@ -85,7 +85,7 @@
]
},
{
"description": "FLE2 decrypt fails with mising key",
"description": "FLE2 decrypt fails with missing key",
"clientOptions": {
"autoEncryptOpts": {
"kmsProviders": {
Expand Down
4 changes: 2 additions & 2 deletions testdata/client-side-encryption/legacy/fle2v2-MissingKey.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ data: [
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'}]}
key_vault_data: []
tests:
- description: "FLE2 encrypt fails with mising key"
- description: "FLE2 encrypt fails with missing key"
clientOptions:
autoEncryptOpts:
kmsProviders:
Expand All @@ -30,7 +30,7 @@ tests:
document: { _id: 1, encryptedIndexed: "123" }
result:
errorContains: "not all keys requested were satisfied"
- description: "FLE2 decrypt fails with mising key"
- description: "FLE2 decrypt fails with missing key"
clientOptions:
autoEncryptOpts:
kmsProviders:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"replicaset",
"sharded",
"load-balanced"
]
],
"serverless": "forbid"
}
],
"database_name": "default",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ runOn:
- minServerVersion: "8.0.0" # Require range v2 support on server.
# FLE 2 Encrypted collections are not supported on standalone.
topology: [ "replicaset", "sharded", "load-balanced" ]
serverless: forbid # Skip on serverless until CLOUDP-267864 is resolved.
database_name: "default"
collection_name: &collection_name "default"
data: []
Expand Down
Loading