@@ -34,11 +34,7 @@ const newEncryptedClient = ({ configuration }: { configuration: TestConfiguratio
34
34
autoEncryption : {
35
35
keyVaultNamespace : 'db.keyvault' ,
36
36
kmsProviders : { local : getCSFLEKMSProviders ( ) . local } ,
37
- extraOptions : {
38
- cryptSharedLibPath : getEncryptExtraOptions ( ) . cryptSharedLibPath ,
39
- mongocryptdBypassSpawn : true ,
40
- cryptSharedLibRequired : true
41
- }
37
+ extraOptions : getEncryptExtraOptions ( )
42
38
}
43
39
}
44
40
) ;
@@ -366,6 +362,22 @@ describe('$lookup support', defaultMetadata, function () {
366
362
let client : MongoClient ;
367
363
368
364
beforeEach ( async function ( ) {
365
+ const mochaTest = {
366
+ metadata : defaultMetadata
367
+ } as unknown as Test ;
368
+
369
+ if ( ! this . configuration . filters . MongoDBVersionFilter . filter ( mochaTest ) ) {
370
+ return ;
371
+ }
372
+
373
+ if ( ! this . configuration . filters . MongoDBTopologyFilter . filter ( mochaTest ) ) {
374
+ return ;
375
+ }
376
+
377
+ if ( ! this . configuration . filters . ClientSideEncryptionFilter . filter ( mochaTest ) ) {
378
+ return ;
379
+ }
380
+
369
381
const getMongoCrypt = sinon . stub ( AutoEncrypter , 'getMongoCrypt' ) . callsFake ( function ( ) {
370
382
const MongoCrypt = getMongoCrypt . wrappedMethod . call ( this ) ;
371
383
return class extends MongoCrypt {
@@ -384,19 +396,15 @@ describe('$lookup support', defaultMetadata, function () {
384
396
autoEncryption : {
385
397
keyVaultNamespace : 'db.keyvault' ,
386
398
kmsProviders : { local : getCSFLEKMSProviders ( ) . local } ,
387
- extraOptions : {
388
- cryptSharedLibPath : getEncryptExtraOptions ( ) . cryptSharedLibPath ,
389
- mongocryptdBypassSpawn : true ,
390
- cryptSharedLibRequired : true
391
- }
399
+ extraOptions : getEncryptExtraOptions ( )
392
400
}
393
401
}
394
402
) ;
395
403
} ) ;
396
404
397
405
afterEach ( async function ( ) {
398
406
sinon . restore ( ) ;
399
- await client . close ( ) ;
407
+ await client ? .close ( ) ;
400
408
} ) ;
401
409
402
410
it (
0 commit comments