[SERVER-65404] jstests/fle2/query/find.js non-transaction test case should query against encrypted data Created: 08/Apr/22  Updated: 29/Oct/23  Resolved: 12/Apr/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.0.0-rc0

Type: Bug Priority: Blocker - P1
Reporter: Mark Benvenuto Assignee: Davis Haupt (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: QO 2022-04-18
Participants:

 Description   

Currently, the test uses `runEncryptedTest` which creates a test collection The test then drops the collection and relies on implicit create which means there is no encryption happening.

Example fix with verification collection is encrypted:

diff --git a/jstests/fle2/query/find.js b/jstests/fle2/query/find.js
index 4f834d4c9a..aa76844e44 100644
--- a/jstests/fle2/query/find.js
+++ b/jstests/fle2/query/find.js
@@ -37,19 +37,20 @@ const runTestWithColl = ({insert = [], before = null, query, expected}, testColl
 const {encryptedFields, tests} = matchExpressionFLETestCases;
 
 let collName = jsTestName();
-runEncryptedTest(db, "find", collName, encryptedFields, (edb) => {
+runEncryptedTest(db, "find", collName, encryptedFields, (edb, client) => {
     print("non-transaction test cases.");
     const coll = edb[collName];
-    coll.drop();
 
     let i = 0;
     for (const test of tests) {
         runTestWithColl(test, coll, {index: i++, testData: test, transaction: false});
     }
+
+    client.assertEncryptedCollectionCounts(collName, 4,9,1,10);
 });



 Comments   
Comment by Githook User [ 12/Apr/22 ]

Author:

{'name': 'Davis Haupt', 'email': 'davis.haupt@mongodb.com', 'username': 'davish'}

Message: SERVER-65404 ensure FLE test cases query on encrypted data
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/fea4ef761d6263720ce1fa978ef13ebf82514407

Comment by Davis Haupt (Inactive) [ 11/Apr/22 ]

In the commit queue, currently at position 19 at the time of writing.

Generated at Thu Feb 08 06:02:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.