@@ -20,9 +20,9 @@ import {
20
20
} from '../../../../src/client-side-encryption/providers/azure' ;
21
21
// eslint-disable-next-line @typescript-eslint/no-restricted-imports
22
22
import * 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
24
24
import { AWSSDKCredentialProvider } from '../../../../src/cmap/auth/aws_temporary_credentials' ;
25
- import { MongoAWSError } from '../../../../src/error ' ;
25
+ import * as requirements from '../requirements.helper ' ;
26
26
27
27
const originalAccessKeyId = process . env . AWS_ACCESS_KEY_ID ;
28
28
const originalSecretAccessKey = process . env . AWS_SECRET_ACCESS_KEY ;
@@ -156,29 +156,6 @@ describe('#refreshKMSCredentials', function () {
156
156
} ) ;
157
157
} ) ;
158
158
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
-
182
159
context ( 'when the AWS SDK returns unknown fields' , function ( ) {
183
160
beforeEach ( ( ) => {
184
161
sinon . stub ( AWSSDKCredentialProvider . prototype , 'getCredentials' ) . resolves ( {
0 commit comments