blob: d7841cf4ff648ef493afa2b0bcfbf326be09f62b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
// Verify create encrypted collection with range index works
/**
* @tags: [
* requires_fcv_70,
* assumes_unsharded_collection
* ]
*/
(function() {
'use strict';
let dbTest = db.getSiblingDB('create_range_encrypted_collection_db');
dbTest.basic.drop();
const sampleEncryptedFields = {
"fields": [
{
"path": "firstName",
"keyId": UUID("11d58b8a-0c6c-4d69-a0bd-70c6d9befae9"),
"bsonType": "int",
"queries":
{"queryType": "rangePreview", "sparsity": 1, min: NumberInt(1), max: NumberInt(2)}
},
]
};
assert.commandWorked(dbTest.createCollection("basic", {encryptedFields: sampleEncryptedFields}));
}());
|