diff options
author | Erwin Pe <erwin.pe@mongodb.com> | 2022-02-11 17:40:24 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-02-11 18:33:42 +0000 |
commit | 7f30babba00b8bea2df2f1d62d3b29f3bf1f14fa (patch) | |
tree | bf78e5ff5b1aa9d664fee3089305acf576e35288 /jstests/core | |
parent | 7ebe8364c1234261a500870df642d245fc8b6f5f (diff) | |
download | mongo-7f30babba00b8bea2df2f1d62d3b29f3bf1f14fa.tar.gz |
SERVER-63464 Create Collection restrictions with encrypted fields
Diffstat (limited to 'jstests/core')
-rw-r--r-- | jstests/core/create_encrypted_collection.js | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/jstests/core/create_encrypted_collection.js b/jstests/core/create_encrypted_collection.js deleted file mode 100644 index 81915fa6618..00000000000 --- a/jstests/core/create_encrypted_collection.js +++ /dev/null @@ -1,43 +0,0 @@ -// Verify valid and invalid scenarios for create encrypted collection - -/** - * @tags: [ - * featureFlagFLE2, - * assumes_against_mongod_not_mongos, - * no_selinux - * ] - */ -(function() { -'use strict'; - -const isFLE2Enabled = TestData == undefined || TestData.setParameters.featureFlagFLE2; - -if (!isFLE2Enabled) { - return; -} - -let dbTest = db.getSiblingDB('create_encrypted_collection_db'); - -dbTest.basic.drop(); - -assert.commandWorked(dbTest.createCollection("basic", { - encryptedFields: { - "fields": [ - { - "path": "firstName", - "keyId": UUID("11d58b8a-0c6c-4d69-a0bd-70c6d9befae9"), - "bsonType": "string", - "queries": {"queryType": "equality"} // allow single object or array - }, - - ] - } -})); - -const result = dbTest.getCollectionInfos({name: "basic"}); -print("result" + tojson(result)); -const ef = result[0].options.encryptedFields; -assert.eq(ef.escCollection, "fle2.basic.esc"); -assert.eq(ef.eccCollection, "fle2.basic.ecc"); -assert.eq(ef.ecocCollection, "fle2.basic.ecoc"); -}()); |