Skip to content

Commit d86d2ae

Browse files
authored
test(NODE-6024): sync skip rangePreview tests on server 8.0+ (#4039)
1 parent d15dcbb commit d86d2ae

File tree

91 files changed

+190
-49
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+190
-49
lines changed

test/integration/client-side-encryption/client_side_encryption.prose.22.range_explicit_encryption.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { EJSON } from 'bson';
22
import { expect } from 'chai';
33
import { readFile } from 'fs/promises';
44
import { join } from 'path';
5+
import * as semver from 'semver';
56

67
import { Decimal128, type Document, Double, Long, type MongoClient } from '../../../src';
78
/* eslint-disable @typescript-eslint/no-restricted-imports */
@@ -126,6 +127,14 @@ const readEncryptedFieldsFile = (dataType: string): Promise<string> =>
126127
describe('Range Explicit Encryption', function () {
127128
installNodeDNSWorkaroundHooks();
128129

130+
beforeEach(async function () {
131+
if (semver.gte(this.configuration.version, '7.999.999')) {
132+
if (this.currentTest)
133+
this.currentTest.skipReason = 'TODO(NODE-5908): skip rangePreview tests on server 8.0+';
134+
return this.currentTest?.skip();
135+
}
136+
});
137+
129138
let clientEncryption;
130139
let keyId;
131140
let keyVaultClient;

test/spec/client-side-encryption/tests/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": {

test/spec/client-side-encryption/tests/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:

test/spec/client-side-encryption/tests/legacy/fle2v2-Range-Date-Aggregate.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+
"maxServerVersion": "7.99.99"
1011
}
1112
],
1213
"database_name": "default",

test/spec/client-side-encryption/tests/legacy/fle2v2-Range-Date-Aggregate.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ runOn:
55
# Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol.
66
# FLE 2 Encrypted collections are not supported on standalone.
77
topology: [ "replicaset", "sharded", "load-balanced" ]
8+
# Skip tests for "rangePreview" algorithm on Server 8.0+. Server 8.0 drops "rangePreview" and adds "range".
9+
maxServerVersion: "7.99.99"
810
database_name: &database_name "default"
911
collection_name: &collection_name "default"
1012
data: []

test/spec/client-side-encryption/tests/legacy/fle2v2-Range-Date-Correctness.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+
"maxServerVersion": "7.99.99"
1011
}
1112
],
1213
"database_name": "default",

test/spec/client-side-encryption/tests/legacy/fle2v2-Range-Date-Correctness.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ runOn:
77
# Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol.
88
# FLE 2 Encrypted collections are not supported on standalone.
99
topology: [ "replicaset", "sharded", "load-balanced" ]
10+
# Skip tests for "rangePreview" algorithm on Server 8.0+. Server 8.0 drops "rangePreview" and adds "range".
11+
maxServerVersion: "7.99.99"
1012
database_name: &database_name "default"
1113
collection_name: &collection_name "default"
1214
data: []

test/spec/client-side-encryption/tests/legacy/fle2v2-Range-Date-Delete.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+
"maxServerVersion": "7.99.99"
1011
}
1112
],
1213
"database_name": "default",

test/spec/client-side-encryption/tests/legacy/fle2v2-Range-Date-Delete.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ runOn:
55
# Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol.
66
# FLE 2 Encrypted collections are not supported on standalone.
77
topology: [ "replicaset", "sharded", "load-balanced" ]
8+
# Skip tests for "rangePreview" algorithm on Server 8.0+. Server 8.0 drops "rangePreview" and adds "range".
9+
maxServerVersion: "7.99.99"
810
database_name: &database_name "default"
911
collection_name: &collection_name "default"
1012
data: []

test/spec/client-side-encryption/tests/legacy/fle2v2-Range-Date-FindOneAndUpdate.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+
"maxServerVersion": "7.99.99"
1011
}
1112
],
1213
"database_name": "default",

0 commit comments

Comments
 (0)