Skip to content

Commit 8b69159

Browse files
committed
update spec tests
1 parent 05a64e7 commit 8b69159

File tree

88 files changed

+1344
-1245
lines changed

Some content is hidden

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

88 files changed

+1344
-1245
lines changed

testdata/client-side-encryption/legacy/fle2v2-Range-Date-Aggregate.json renamed to testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-Aggregate.json

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
{
22
"runOn": [
33
{
4-
"minServerVersion": "7.0.0",
4+
"minServerVersion": "8.0.0",
55
"topology": [
66
"replicaset",
77
"sharded",
88
"load-balanced"
9-
],
10-
"maxServerVersion": "7.99.99"
9+
]
1110
}
1211
],
1312
"database_name": "default",
@@ -25,10 +24,13 @@
2524
"path": "encryptedDate",
2625
"bsonType": "date",
2726
"queries": {
28-
"queryType": "rangePreview",
27+
"queryType": "range",
2928
"contention": {
3029
"$numberLong": "0"
3130
},
31+
"trimFactor": {
32+
"$numberInt": "1"
33+
},
3234
"sparsity": {
3335
"$numberLong": "1"
3436
},
@@ -226,10 +228,13 @@
226228
"path": "encryptedDate",
227229
"bsonType": "date",
228230
"queries": {
229-
"queryType": "rangePreview",
231+
"queryType": "range",
230232
"contention": {
231233
"$numberLong": "0"
232234
},
235+
"trimFactor": {
236+
"$numberInt": "1"
237+
},
233238
"sparsity": {
234239
"$numberLong": "1"
235240
},
@@ -283,10 +288,13 @@
283288
"path": "encryptedDate",
284289
"bsonType": "date",
285290
"queries": {
286-
"queryType": "rangePreview",
291+
"queryType": "range",
287292
"contention": {
288293
"$numberLong": "0"
289294
},
295+
"trimFactor": {
296+
"$numberInt": "1"
297+
},
290298
"sparsity": {
291299
"$numberLong": "1"
292300
},
@@ -346,10 +354,13 @@
346354
"path": "encryptedDate",
347355
"bsonType": "date",
348356
"queries": {
349-
"queryType": "rangePreview",
357+
"queryType": "range",
350358
"contention": {
351359
"$numberLong": "0"
352360
},
361+
"trimFactor": {
362+
"$numberInt": "1"
363+
},
353364
"sparsity": {
354365
"$numberLong": "1"
355366
},
@@ -383,12 +394,6 @@
383394
"$$type": "binData"
384395
},
385396
"__safeContent__": [
386-
{
387-
"$binary": {
388-
"base64": "5nRutVIyq7URVOVtbE4vM01APSIajAVnsShMwjBlzkM=",
389-
"subType": "00"
390-
}
391-
},
392397
{
393398
"$binary": {
394399
"base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=",
@@ -445,12 +450,6 @@
445450
"$$type": "binData"
446451
},
447452
"__safeContent__": [
448-
{
449-
"$binary": {
450-
"base64": "bE1vqWj3KNyM7cCYUv/cnYm8BPaUL3eMp5syTHq6NF4=",
451-
"subType": "00"
452-
}
453-
},
454453
{
455454
"$binary": {
456455
"base64": "25j9sQXZCihCmHKvTHgaBsAVZFcGPn7JjHdrCGlwyyw=",

testdata/client-side-encryption/legacy/fle2v2-Range-Date-Aggregate.yml renamed to testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-Aggregate.yml

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11

22
# Requires libmongocrypt 1.8.0.
33
runOn:
4-
- minServerVersion: "7.0.0"
4+
- minServerVersion: "8.0.0"
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"
108
database_name: &database_name "default"
119
collection_name: &collection_name "default"
1210
data: []
13-
encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedDate', 'bsonType': 'date', 'queries': {'queryType': 'rangePreview', 'contention': {'$numberLong': '0'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$date': {'$numberLong': '0'}}, 'max': {'$date': {'$numberLong': '200'}}}}]}
11+
encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedDate', 'bsonType': 'date', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$date': {'$numberLong': '0'}}, 'max': {'$date': {'$numberLong': '200'}}}}]}
1412
key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ]
1513
tests:
1614
- description: "FLE2 Range Date. Aggregate."
@@ -124,12 +122,6 @@ tests:
124122
"_id": 0,
125123
"encryptedDate": { $$type: "binData" },
126124
"__safeContent__": [
127-
{
128-
"$binary": {
129-
"base64": "5nRutVIyq7URVOVtbE4vM01APSIajAVnsShMwjBlzkM=",
130-
"subType": "00"
131-
}
132-
},
133125
{
134126
"$binary": {
135127
"base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=",
@@ -185,12 +177,6 @@ tests:
185177
"_id": 1,
186178
"encryptedDate": { $$type: "binData" },
187179
"__safeContent__": [
188-
{
189-
"$binary": {
190-
"base64": "bE1vqWj3KNyM7cCYUv/cnYm8BPaUL3eMp5syTHq6NF4=",
191-
"subType": "00"
192-
}
193-
},
194180
{
195181
"$binary": {
196182
"base64": "25j9sQXZCihCmHKvTHgaBsAVZFcGPn7JjHdrCGlwyyw=",
@@ -240,4 +226,4 @@ tests:
240226
}
241227
}
242228
]
243-
}
229+
}

testdata/client-side-encryption/legacy/fle2v2-Range-Date-Correctness.json renamed to testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-Correctness.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
{
22
"runOn": [
33
{
4-
"minServerVersion": "7.0.0",
4+
"minServerVersion": "8.0.0",
55
"topology": [
66
"replicaset",
77
"sharded",
88
"load-balanced"
9-
],
10-
"maxServerVersion": "7.99.99"
9+
]
1110
}
1211
],
1312
"database_name": "default",
@@ -25,10 +24,13 @@
2524
"path": "encryptedDate",
2625
"bsonType": "date",
2726
"queries": {
28-
"queryType": "rangePreview",
27+
"queryType": "range",
2928
"contention": {
3029
"$numberLong": "0"
3130
},
31+
"trimFactor": {
32+
"$numberInt": "1"
33+
},
3234
"sparsity": {
3335
"$numberLong": "1"
3436
},

testdata/client-side-encryption/legacy/fle2v2-Range-Date-Correctness.yml renamed to testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-Correctness.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,14 @@
33

44
# Requires libmongocrypt 1.8.0.
55
runOn:
6-
- minServerVersion: "7.0.0"
6+
- minServerVersion: "8.0.0"
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"
1210
database_name: &database_name "default"
1311
collection_name: &collection_name "default"
1412
data: []
15-
encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedDate', 'bsonType': 'date', 'queries': {'queryType': 'rangePreview', 'contention': {'$numberLong': '0'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$date': {'$numberLong': '0'}}, 'max': {'$date': {'$numberLong': '200'}}}}]}
13+
encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedDate', 'bsonType': 'date', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$date': {'$numberLong': '0'}}, 'max': {'$date': {'$numberLong': '200'}}}}]}
1614
key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ]
1715
tests:
1816
- description: "Find with $gt"
@@ -421,4 +419,4 @@ tests:
421419
filter: { encryptedDate: { $gte: { $numberDouble: "0" } }}
422420
result:
423421
# expect an error mongocryptd.
424-
errorContains: "value type is a date"
422+
errorContains: "value type is a date"

testdata/client-side-encryption/legacy/fle2v2-Range-Date-Delete.json renamed to testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-Delete.json

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
{
22
"runOn": [
33
{
4-
"minServerVersion": "7.0.0",
4+
"minServerVersion": "8.0.0",
55
"topology": [
66
"replicaset",
77
"sharded",
88
"load-balanced"
9-
],
10-
"maxServerVersion": "7.99.99"
9+
]
1110
}
1211
],
1312
"database_name": "default",
@@ -25,10 +24,13 @@
2524
"path": "encryptedDate",
2625
"bsonType": "date",
2726
"queries": {
28-
"queryType": "rangePreview",
27+
"queryType": "range",
2928
"contention": {
3029
"$numberLong": "0"
3130
},
31+
"trimFactor": {
32+
"$numberInt": "1"
33+
},
3234
"sparsity": {
3335
"$numberLong": "1"
3436
},
@@ -215,10 +217,13 @@
215217
"path": "encryptedDate",
216218
"bsonType": "date",
217219
"queries": {
218-
"queryType": "rangePreview",
220+
"queryType": "range",
219221
"contention": {
220222
"$numberLong": "0"
221223
},
224+
"trimFactor": {
225+
"$numberInt": "1"
226+
},
222227
"sparsity": {
223228
"$numberLong": "1"
224229
},
@@ -272,10 +277,13 @@
272277
"path": "encryptedDate",
273278
"bsonType": "date",
274279
"queries": {
275-
"queryType": "rangePreview",
280+
"queryType": "range",
276281
"contention": {
277282
"$numberLong": "0"
278283
},
284+
"trimFactor": {
285+
"$numberInt": "1"
286+
},
279287
"sparsity": {
280288
"$numberLong": "1"
281289
},
@@ -336,10 +344,13 @@
336344
"path": "encryptedDate",
337345
"bsonType": "date",
338346
"queries": {
339-
"queryType": "rangePreview",
347+
"queryType": "range",
340348
"contention": {
341349
"$numberLong": "0"
342350
},
351+
"trimFactor": {
352+
"$numberInt": "1"
353+
},
343354
"sparsity": {
344355
"$numberLong": "1"
345356
},
@@ -373,12 +384,6 @@
373384
"$$type": "binData"
374385
},
375386
"__safeContent__": [
376-
{
377-
"$binary": {
378-
"base64": "5nRutVIyq7URVOVtbE4vM01APSIajAVnsShMwjBlzkM=",
379-
"subType": "00"
380-
}
381-
},
382387
{
383388
"$binary": {
384389
"base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=",

testdata/client-side-encryption/legacy/fle2v2-Range-Date-Delete.yml renamed to testdata/client-side-encryption/legacy/fle2v2-Rangev2-Date-Delete.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11

22
# Requires libmongocrypt 1.8.0.
33
runOn:
4-
- minServerVersion: "7.0.0"
4+
- minServerVersion: "8.0.0"
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"
108
database_name: &database_name "default"
119
collection_name: &collection_name "default"
1210
data: []
13-
encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedDate', 'bsonType': 'date', 'queries': {'queryType': 'rangePreview', 'contention': {'$numberLong': '0'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$date': {'$numberLong': '0'}}, 'max': {'$date': {'$numberLong': '200'}}}}]}
11+
encrypted_fields: &encrypted_fields {'fields': [{'keyId': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'path': 'encryptedDate', 'bsonType': 'date', 'queries': {'queryType': 'range', 'contention': {'$numberLong': '0'}, 'trimFactor': {'$numberInt': '1'}, 'sparsity': {'$numberLong': '1'}, 'min': {'$date': {'$numberLong': '0'}}, 'max': {'$date': {'$numberLong': '200'}}}}]}
1412
key_vault_data: [ {'_id': {'$binary': {'base64': 'EjRWeBI0mHYSNBI0VniQEg==', 'subType': '04'}}, 'keyMaterial': {'$binary': {'base64': 'sHe0kz57YW7v8g9VP9sf/+K1ex4JqKc5rf/URX3n3p8XdZ6+15uXPaSayC6adWbNxkFskuMCOifDoTT+rkqMtFkDclOy884RuGGtUysq3X7zkAWYTKi8QAfKkajvVbZl2y23UqgVasdQu3OVBQCrH/xY00nNAs/52e958nVjBuzQkSb1T8pKJAyjZsHJ60+FtnfafDZSTAIBJYn7UWBCwQ==', 'subType': '00'}}, 'creationDate': {'$date': {'$numberLong': '1648914851981'}}, 'updateDate': {'$date': {'$numberLong': '1648914851981'}}, 'status': {'$numberInt': '0'}, 'masterKey': {'provider': 'local'}} ]
1513
tests:
1614
- description: "FLE2 Range Date. Delete."
@@ -126,12 +124,6 @@ tests:
126124
"_id": 0,
127125
"encryptedDate": { $$type: "binData" },
128126
"__safeContent__": [
129-
{
130-
"$binary": {
131-
"base64": "5nRutVIyq7URVOVtbE4vM01APSIajAVnsShMwjBlzkM=",
132-
"subType": "00"
133-
}
134-
},
135127
{
136128
"$binary": {
137129
"base64": "RjBYT2h3ZAoHxhf8DU6/dFbDkEBZp0IxREcsRTu2MXs=",
@@ -181,4 +173,4 @@ tests:
181173
}
182174
}
183175
]
184-
}
176+
}

0 commit comments

Comments
 (0)