@@ -6,7 +6,6 @@ const log = new DummyRequestLogger();
66const { makeRequest } = require ( '../raw-node/utils/makeRequest' ) ;
77const helpers = require ( './helpers' ) ;
88const scenarios = require ( './scenarios' ) ;
9- const kms = require ( '../../../lib/kms/wrapper' ) ;
109
1110// copy part of aws-node-sdk/test/object/encryptionHeaders.js and add more tests
1211
@@ -508,7 +507,6 @@ describe('ensure MPU use good SSE', () => {
508507} ) ;
509508
510509describe ( 'KMS error' , ( ) => {
511- const destroyKmsKey = promisify ( kms . destroyBucketKey ) ;
512510 const sseConfig = { algo : 'aws:kms' , masterKeyId : true }
513511 const Bucket = 'bkt-kms-err' ;
514512 const Key = 'obj' ;
@@ -560,14 +558,14 @@ describe('KMS error', () => {
560558 // ensure we can decrypt and read the object
561559 const obj = await helpers . s3 . getObject ( { Bucket, Key } ) . promise ( ) ;
562560 assert . strictEqual ( obj . Body . toString ( ) , body ) ;
563- void await destroyKmsKey ( masterKeyArn , log ) ;
561+ void await helpers . destroyKmsKey ( masterKeyArn , log ) ;
564562 } ) ;
565563
566564 after ( async ( ) => {
567565 void await helpers . cleanup ( Bucket ) ;
568566 if ( masterKeyArn ) {
569567 try {
570- void await destroyKmsKey ( masterKeyArn , log ) ;
568+ void await helpers . destroyKmsKey ( masterKeyArn , log ) ;
571569 } catch ( e ) { void e ; }
572570 [ masterKeyArn , masterKeyId ] = [ null , null ] ;
573571 }
@@ -576,7 +574,7 @@ describe('KMS error', () => {
576574 afterEach ( async ( ) => {
577575 if ( anotherKeyInfo ) {
578576 try {
579- void await destroyKmsKey ( anotherKeyInfo . masterKeyArn , log ) ;
577+ void await helpers . destroyKmsKey ( anotherKeyInfo . masterKeyArn , log ) ;
580578 } catch ( e ) { void e ; }
581579 anotherKeyInfo = null ;
582580 }
@@ -642,7 +640,7 @@ describe('KMS error', () => {
642640 const mpu = await helpers . s3 . createMultipartUpload (
643641 helpers . putObjParams ( Bucket , mpuKey , sseConfig , anotherKeyInfo . masterKeyArn ) ) . promise ( ) ;
644642
645- void await destroyKmsKey ( anotherKeyInfo . masterKeyArn , log ) ;
643+ void await helpers . destroyKmsKey ( anotherKeyInfo . masterKeyArn , log ) ;
646644 await assert . rejects ( helpers . s3 . uploadPart (
647645 {
648646 UploadId : mpu . UploadId ,
0 commit comments