@@ -44,7 +44,7 @@ const eeMetadata = {
44
44
requires : {
45
45
clientSideEncryption : true ,
46
46
mongodb : '>=6.0.0' ,
47
- topology : [ 'replicaset' , 'sharded' , 'single' ]
47
+ topology : [ 'replicaset' , 'sharded' ]
48
48
}
49
49
} ;
50
50
@@ -1545,7 +1545,8 @@ describe('Client Side Encryption Prose Tests', metadata, function () {
1545
1545
// collection with the filter { "encryptedIndexed": <findPayload> }.
1546
1546
// Assert one document is returned containing the field
1547
1547
// { "encryptedIndexed": "encrypted indexed value" }.
1548
- const result = await encryptedClient . findOne ( { encryptedIndexed : findPayload } ) ;
1548
+ const collection = encryptedClient . db ( 'db' ) . collection ( 'explicit_encryption' ) ;
1549
+ const result = await collection . findOne ( { encryptedIndexed : findPayload } ) ;
1549
1550
expect ( result . encryptedIndexed ) . to . equal ( 'encrypted indexed value' ) ;
1550
1551
} ) ;
1551
1552
} ) ;
@@ -1613,7 +1614,8 @@ describe('Client Side Encryption Prose Tests', metadata, function () {
1613
1614
// Assert less than 10 documents are returned. 0 documents may be returned.
1614
1615
// Assert each returned document contains the field
1615
1616
// { "encryptedIndexed": "encrypted indexed value" }.
1616
- const result = await encryptedClient . find ( { encryptedIndexed : findPayload } ) . toArray ( ) ;
1617
+ const collection = encryptedClient . db ( 'db' ) . collection ( 'explicit_encryption' ) ;
1618
+ const result = await collection . find ( { encryptedIndexed : findPayload } ) . toArray ( ) ;
1617
1619
expect ( result . length ) . to . be . below ( 10 ) ;
1618
1620
for ( const doc of result ) {
1619
1621
expect ( doc . encryptedIndexed ) . to . equal ( 'encrypted indexed value' ) ;
@@ -1625,7 +1627,8 @@ describe('Client Side Encryption Prose Tests', metadata, function () {
1625
1627
// collection with the filter { "encryptedIndexed": <findPayload2> }.
1626
1628
// Assert 10 documents are returned. Assert each returned document contains the
1627
1629
// field { "encryptedIndexed": "encrypted indexed value" }.
1628
- const result = await encryptedClient . find ( { encryptedIndexed : findPayload2 } ) . toArray ( ) ;
1630
+ const collection = encryptedClient . db ( 'db' ) . collection ( 'explicit_encryption' ) ;
1631
+ const result = await collection . find ( { encryptedIndexed : findPayload2 } ) . toArray ( ) ;
1629
1632
expect ( result . length ) . to . equal ( 10 ) ;
1630
1633
for ( const doc of result ) {
1631
1634
expect ( doc . encryptedIndexed ) . to . equal ( 'encrypted indexed value' ) ;
@@ -1651,6 +1654,7 @@ describe('Client Side Encryption Prose Tests', metadata, function () {
1651
1654
// Use encryptedClient to insert the document { "_id": 1, "encryptedUnindexed": <insertPayload> }
1652
1655
// into db.explicit_encryption.
1653
1656
await encryptedClient . db ( 'db' ) . collection ( 'explicit_encryption' ) . insertOne ( {
1657
+ _id : 1 ,
1654
1658
encryptedIndexed : insertPayload
1655
1659
} ) ;
1656
1660
} ) ;
@@ -1660,7 +1664,8 @@ describe('Client Side Encryption Prose Tests', metadata, function () {
1660
1664
// collection with the filter { "_id": 1 }.
1661
1665
// Assert one document is returned containing the field
1662
1666
// { "encryptedUnindexed": "encrypted unindexed value" }.
1663
- const result = await encryptedClient . findOne ( { _id : 1 } ) ;
1667
+ const collection = encryptedClient . db ( 'db' ) . collection ( 'explicit_encryption' ) ;
1668
+ const result = await collection . findOne ( { _id : 1 } ) ;
1664
1669
expect ( result . encryptedIndexed ) . to . equal ( 'encrypted unindexed value' ) ;
1665
1670
} ) ;
1666
1671
} ) ;
@@ -1699,7 +1704,7 @@ describe('Client Side Encryption Prose Tests', metadata, function () {
1699
1704
// algorithm: "Unindexed",
1700
1705
// }
1701
1706
// Store the result in payload.
1702
- payload = await clientEncryption . encrypt ( 'encrypted indexed value' , {
1707
+ payload = await clientEncryption . encrypt ( 'encrypted unindexed value' , {
1703
1708
keyId : key1Id ,
1704
1709
algorithm : 'Unindexed'
1705
1710
} ) ;
0 commit comments