@@ -196,48 +196,6 @@ describe('cryptoCallbacks', function () {
196
196
} ) ;
197
197
} ) ;
198
198
199
- // AES-256-CTR is used specifically with FLE2 only
200
- [ 'aes256CtrEncryptHook' , 'aes256CtrDecryptHook' ] . forEach ( hookName => {
201
- it ( `should properly propagate an error when ${ hookName } fails` , function ( done ) {
202
- const error = new Error ( 'some random error text' ) ;
203
- this . sinon . stub ( cryptoCallbacks , hookName ) . returns ( error ) ;
204
-
205
- const encryption = new ClientEncryption ( this . client , {
206
- keyVaultNamespace : 'test.encryption' ,
207
- kmsProviders
208
- } ) ;
209
-
210
- function finish ( err ) {
211
- try {
212
- expect ( err , 'Expected an error to exist' ) . to . exist ;
213
- expect ( err ) . to . have . property ( 'message' , error . message ) ;
214
- done ( ) ;
215
- } catch ( e ) {
216
- done ( e ) ;
217
- }
218
- }
219
-
220
- try {
221
- encryption . createDataKey ( 'aws' , dataKeyOptions , ( err , dataKey ) => {
222
- if ( err ) return finish ( err ) ;
223
-
224
- const encryptOptions = {
225
- keyId : dataKey ,
226
- algorithm : 'Indexed' ,
227
- contentionFactor : 0
228
- } ;
229
-
230
- encryption . encrypt ( 'hello' , encryptOptions , ( err , encryptedValue ) => {
231
- if ( err ) return finish ( err ) ;
232
- encryption . decrypt ( encryptedValue , err => finish ( err ) ) ;
233
- } ) ;
234
- } ) ;
235
- } catch ( e ) {
236
- done ( new Error ( 'We should not be here' ) ) ;
237
- }
238
- } ) ;
239
- } ) ;
240
-
241
199
// These ones will fail with an error, but that error will get overridden
242
200
// with "failed to create KMS message" in mongocrypt-kms-ctx.c
243
201
[ 'hmacSha256Hook' , 'sha256Hook' ] . forEach ( hookName => {
0 commit comments