File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -261,7 +261,13 @@ function prepareDatabaseForSuite(suite, context) {
261
261
262
262
const coll = db . collection ( context . collectionName ) ;
263
263
return setupPromise
264
- . then ( ( ) => coll . drop ( { writeConcern : { w : 'majority' } } ) )
264
+ . then ( ( ) => {
265
+ const options = { writeConcern : { w : 'majority' } } ;
266
+ if ( suite . encrypted_fields ) {
267
+ options . encryptedFields = suite . encrypted_fields ;
268
+ } ;
269
+ coll . drop ( options ) ;
270
+ } )
265
271
. catch ( err => {
266
272
if ( ! err . message . match ( / n s n o t f o u n d / ) ) throw err ;
267
273
} )
@@ -289,6 +295,9 @@ function prepareDatabaseForSuite(suite, context) {
289
295
if ( suite . json_schema ) {
290
296
options . validator = { $jsonSchema : suite . json_schema } ;
291
297
}
298
+ if ( suite . encrypted_fields ) {
299
+ options . encryptedFields = suite . encrypted_fields ;
300
+ }
292
301
293
302
return db . createCollection ( context . collectionName , options ) ;
294
303
} )
You can’t perform that action at this time.
0 commit comments