Skip to content

Commit

Permalink
test(NODE-6024): sync skip rangePreview tests on server 8.0+ (#4039)
Browse files Browse the repository at this point in the history
  • Loading branch information
nbbeeken committed Mar 15, 2024
1 parent d15dcbb commit d86d2ae
Show file tree
Hide file tree
Showing 91 changed files with 190 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { EJSON } from 'bson';
import { expect } from 'chai';
import { readFile } from 'fs/promises';
import { join } from 'path';
import * as semver from 'semver';

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

beforeEach(async function () {
if (semver.gte(this.configuration.version, '7.999.999')) {
if (this.currentTest)
this.currentTest.skipReason = 'TODO(NODE-5908): skip rangePreview tests on server 8.0+';
return this.currentTest?.skip();
}
});

let clientEncryption;
let keyId;
let keyVaultClient;
Expand Down
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
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"
]
],
"maxServerVersion": "7.99.99"
}
],
"database_name": "default",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ runOn:
# Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol.
# FLE 2 Encrypted collections are not supported on standalone.
topology: [ "replicaset", "sharded", "load-balanced" ]
# Skip tests for "rangePreview" algorithm on Server 8.0+. Server 8.0 drops "rangePreview" and adds "range".
maxServerVersion: "7.99.99"
database_name: &database_name "default"
collection_name: &collection_name "default"
data: []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"replicaset",
"sharded",
"load-balanced"
]
],
"maxServerVersion": "7.99.99"
}
],
"database_name": "default",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ runOn:
# Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol.
# FLE 2 Encrypted collections are not supported on standalone.
topology: [ "replicaset", "sharded", "load-balanced" ]
# Skip tests for "rangePreview" algorithm on Server 8.0+. Server 8.0 drops "rangePreview" and adds "range".
maxServerVersion: "7.99.99"
database_name: &database_name "default"
collection_name: &collection_name "default"
data: []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"replicaset",
"sharded",
"load-balanced"
]
],
"maxServerVersion": "7.99.99"
}
],
"database_name": "default",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ runOn:
# Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol.
# FLE 2 Encrypted collections are not supported on standalone.
topology: [ "replicaset", "sharded", "load-balanced" ]
# Skip tests for "rangePreview" algorithm on Server 8.0+. Server 8.0 drops "rangePreview" and adds "range".
maxServerVersion: "7.99.99"
database_name: &database_name "default"
collection_name: &collection_name "default"
data: []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"replicaset",
"sharded",
"load-balanced"
]
],
"maxServerVersion": "7.99.99"
}
],
"database_name": "default",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ runOn:
# Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol.
# FLE 2 Encrypted collections are not supported on standalone.
topology: [ "replicaset", "sharded", "load-balanced" ]
# Skip tests for "rangePreview" algorithm on Server 8.0+. Server 8.0 drops "rangePreview" and adds "range".
maxServerVersion: "7.99.99"
database_name: &database_name "default"
collection_name: &collection_name "default"
data: []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"replicaset",
"sharded",
"load-balanced"
]
],
"maxServerVersion": "7.99.99"
}
],
"database_name": "default",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ runOn:
# Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol.
# FLE 2 Encrypted collections are not supported on standalone.
topology: [ "replicaset", "sharded", "load-balanced" ]
# Skip tests for "rangePreview" algorithm on Server 8.0+. Server 8.0 drops "rangePreview" and adds "range".
maxServerVersion: "7.99.99"
database_name: &database_name "default"
collection_name: &collection_name "default"
data: []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"replicaset",
"sharded",
"load-balanced"
]
],
"maxServerVersion": "7.99.99"
}
],
"database_name": "default",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ runOn:
# Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol.
# FLE 2 Encrypted collections are not supported on standalone.
topology: [ "replicaset", "sharded", "load-balanced" ]
# Skip tests for "rangePreview" algorithm on Server 8.0+. Server 8.0 drops "rangePreview" and adds "range".
maxServerVersion: "7.99.99"
database_name: &database_name "default"
collection_name: &collection_name "default"
data: []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"minServerVersion": "7.0.0",
"topology": [
"replicaset"
]
],
"maxServerVersion": "7.99.99"
}
],
"database_name": "default",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ runOn:
# FLE 2 Encrypted collections are not supported on standalone.
# Tests for Decimal (without precision) must only run against a replica set. Decimal (without precision) queries are expected to take a long time and may exceed the default mongos timeout.
topology: [ "replicaset" ]
# Skip tests for "rangePreview" algorithm on Server 8.0+. Server 8.0 drops "rangePreview" and adds "range".
maxServerVersion: "7.99.99"
database_name: &database_name "default"
collection_name: &collection_name "default"
data: []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"minServerVersion": "7.0.0",
"topology": [
"replicaset"
]
],
"maxServerVersion": "7.99.99"
}
],
"database_name": "default",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ runOn:
# FLE 2 Encrypted collections are not supported on standalone.
# Tests for Decimal (without precision) must only run against a replica set. Decimal (without precision) queries are expected to take a long time and may exceed the default mongos timeout.
topology: [ "replicaset" ]
# Skip tests for "rangePreview" algorithm on Server 8.0+. Server 8.0 drops "rangePreview" and adds "range".
maxServerVersion: "7.99.99"
database_name: &database_name "default"
collection_name: &collection_name "default"
data: []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"minServerVersion": "7.0.0",
"topology": [
"replicaset"
]
],
"maxServerVersion": "7.99.99"
}
],
"database_name": "default",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ runOn:
# FLE 2 Encrypted collections are not supported on standalone.
# Tests for Decimal (without precision) must only run against a replica set. Decimal (without precision) queries are expected to take a long time and may exceed the default mongos timeout.
topology: [ "replicaset" ]
# Skip tests for "rangePreview" algorithm on Server 8.0+. Server 8.0 drops "rangePreview" and adds "range".
maxServerVersion: "7.99.99"
database_name: &database_name "default"
collection_name: &collection_name "default"
data: []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"minServerVersion": "7.0.0",
"topology": [
"replicaset"
]
],
"maxServerVersion": "7.99.99"
}
],
"database_name": "default",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ runOn:
# FLE 2 Encrypted collections are not supported on standalone.
# Tests for Decimal (without precision) must only run against a replica set. Decimal (without precision) queries are expected to take a long time and may exceed the default mongos timeout.
topology: [ "replicaset" ]
# Skip tests for "rangePreview" algorithm on Server 8.0+. Server 8.0 drops "rangePreview" and adds "range".
maxServerVersion: "7.99.99"
database_name: &database_name "default"
collection_name: &collection_name "default"
data: []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"minServerVersion": "7.0.0",
"topology": [
"replicaset"
]
],
"maxServerVersion": "7.99.99"
}
],
"database_name": "default",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ runOn:
# FLE 2 Encrypted collections are not supported on standalone.
# Tests for Decimal (without precision) must only run against a replica set. Decimal (without precision) queries are expected to take a long time and may exceed the default mongos timeout.
topology: [ "replicaset" ]
# Skip tests for "rangePreview" algorithm on Server 8.0+. Server 8.0 drops "rangePreview" and adds "range".
maxServerVersion: "7.99.99"
database_name: &database_name "default"
collection_name: &collection_name "default"
data: []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"minServerVersion": "7.0.0",
"topology": [
"replicaset"
]
],
"maxServerVersion": "7.99.99"
}
],
"database_name": "default",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ runOn:
# FLE 2 Encrypted collections are not supported on standalone.
# Tests for Decimal (without precision) must only run against a replica set. Decimal (without precision) queries are expected to take a long time and may exceed the default mongos timeout.
topology: [ "replicaset" ]
# Skip tests for "rangePreview" algorithm on Server 8.0+. Server 8.0 drops "rangePreview" and adds "range".
maxServerVersion: "7.99.99"
database_name: &database_name "default"
collection_name: &collection_name "default"
data: []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"replicaset",
"sharded",
"load-balanced"
]
],
"maxServerVersion": "7.99.99"
}
],
"database_name": "default",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ runOn:
# Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol.
# FLE 2 Encrypted collections are not supported on standalone.
topology: [ "replicaset", "sharded", "load-balanced" ]
# Skip tests for "rangePreview" algorithm on Server 8.0+. Server 8.0 drops "rangePreview" and adds "range".
maxServerVersion: "7.99.99"
database_name: &database_name "default"
collection_name: &collection_name "default"
data: []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"replicaset",
"sharded",
"load-balanced"
]
],
"maxServerVersion": "7.99.99"
}
],
"database_name": "default",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ runOn:
# Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol.
# FLE 2 Encrypted collections are not supported on standalone.
topology: [ "replicaset", "sharded", "load-balanced" ]
# Skip tests for "rangePreview" algorithm on Server 8.0+. Server 8.0 drops "rangePreview" and adds "range".
maxServerVersion: "7.99.99"
database_name: &database_name "default"
collection_name: &collection_name "default"
data: []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"replicaset",
"sharded",
"load-balanced"
]
],
"maxServerVersion": "7.99.99"
}
],
"database_name": "default",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ runOn:
# Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol.
# FLE 2 Encrypted collections are not supported on standalone.
topology: [ "replicaset", "sharded", "load-balanced" ]
# Skip tests for "rangePreview" algorithm on Server 8.0+. Server 8.0 drops "rangePreview" and adds "range".
maxServerVersion: "7.99.99"
database_name: &database_name "default"
collection_name: &collection_name "default"
data: []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"replicaset",
"sharded",
"load-balanced"
]
],
"maxServerVersion": "7.99.99"
}
],
"database_name": "default",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ runOn:
# Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol.
# FLE 2 Encrypted collections are not supported on standalone.
topology: [ "replicaset", "sharded", "load-balanced" ]
# Skip tests for "rangePreview" algorithm on Server 8.0+. Server 8.0 drops "rangePreview" and adds "range".
maxServerVersion: "7.99.99"
database_name: &database_name "default"
collection_name: &collection_name "default"
data: []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"replicaset",
"sharded",
"load-balanced"
]
],
"maxServerVersion": "7.99.99"
}
],
"database_name": "default",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ runOn:
# Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol.
# FLE 2 Encrypted collections are not supported on standalone.
topology: [ "replicaset", "sharded", "load-balanced" ]
# Skip tests for "rangePreview" algorithm on Server 8.0+. Server 8.0 drops "rangePreview" and adds "range".
maxServerVersion: "7.99.99"
database_name: &database_name "default"
collection_name: &collection_name "default"
data: []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"replicaset",
"sharded",
"load-balanced"
]
],
"maxServerVersion": "7.99.99"
}
],
"database_name": "default",
Expand Down
Loading

0 comments on commit d86d2ae

Please sign in to comment.