@@ -20,9 +20,9 @@ import {
2020} from '../../../../src/client-side-encryption/providers/azure' ;
2121// eslint-disable-next-line @typescript-eslint/no-restricted-imports
2222import * as utils from '../../../../src/client-side-encryption/providers/utils' ;
23- import * as requirements from '../requirements.helper' ;
23+ // eslint-disable-next-line @typescript-eslint/no-restricted-imports
2424import { AWSSDKCredentialProvider } from '../../../../src/cmap/auth/aws_temporary_credentials' ;
25- import { MongoAWSError } from '../../../../src/error ' ;
25+ import * as requirements from '../requirements.helper ' ;
2626
2727const originalAccessKeyId = process . env . AWS_ACCESS_KEY_ID ;
2828const originalSecretAccessKey = process . env . AWS_SECRET_ACCESS_KEY ;
@@ -156,29 +156,6 @@ describe('#refreshKMSCredentials', function () {
156156 } ) ;
157157 } ) ;
158158
159- context ( 'when the sdk is not installed' , function ( ) {
160- const kmsProviders = {
161- local : {
162- key : Buffer . alloc ( 96 )
163- } ,
164- aws : { }
165- } ;
166-
167- before ( function ( ) {
168- if ( requirements . credentialProvidersInstalled . aws && this . currentTest ) {
169- this . currentTest . skipReason = 'Credentials will be loaded when sdk present' ;
170- this . currentTest . skip ( ) ;
171- return ;
172- }
173- } ) ;
174-
175- it ( 'throws a MongoAWSError' , async function ( ) {
176- const error = await refreshKMSCredentials ( kmsProviders ) . catch ( e => e ) ;
177- const expectedErrorMessage = 'Optional module `@aws-sdk/credential-providers` not found' ;
178- expect ( error ) . to . be . instanceOf ( MongoAWSError ) . to . match ( new RegExp ( expectedErrorMessage , 'i' ) ) ;
179- } ) ;
180- } ) ;
181-
182159 context ( 'when the AWS SDK returns unknown fields' , function ( ) {
183160 beforeEach ( ( ) => {
184161 sinon . stub ( AWSSDKCredentialProvider . prototype , 'getCredentials' ) . resolves ( {
0 commit comments