Skip to content

Commit

Permalink
test(NODE-5147): fix broken range index test (#3612)
Browse files Browse the repository at this point in the history
  • Loading branch information
baileympearson authored Mar 29, 2023
1 parent eb836bb commit b038cbb
Showing 1 changed file with 24 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -222,27 +222,30 @@ describe('Range Explicit Encryption', function () {
encryptedTwoHundred = await clientEncryption.encrypt(factory(200), opts);

const key = `encrypted${dataType}`;
await encryptedClient
.db('db')
.collection('explicit_encryption')
.insertMany([
{
[key]: encryptedZero,
_id: 0
},
{
[key]: encryptedSix,
_id: 1
},
{
[key]: encryptedThirty,
_id: 2
},
{
[key]: encryptedTwoHundred,
_id: 3
}
]);
const documents = [
{
[key]: encryptedZero,
_id: 0
},
{
[key]: encryptedSix,
_id: 1
},
{
[key]: encryptedThirty,
_id: 2
},
{
[key]: encryptedTwoHundred,
_id: 3
}
];

// Queryable encryption only supports single document inserts, so we must insert the documents
// one at a time.
for (const doc of documents) {
await encryptedClient.db('db').collection('explicit_encryption').insertOne(doc);
}

await utilClient.close();
});
Expand Down

0 comments on commit b038cbb

Please sign in to comment.