Commit 2ce384f 1 parent a4957eb commit 2ce384f Copy full SHA for 2ce384f
File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ class AWSInstanceProfileCredentials {
82
82
83
83
async _fetchCredentials ( ) : Promise < IAWSMetadataCredentials | undefined > {
84
84
try {
85
- const resp = await fetch ( `${ metadataUrl } /iam/security-credentials/${ this . profile ( ) } ` ) ;
85
+ const resp = await fetch ( `${ metadataUrl } /iam/security-credentials/${ await this . profile ( ) } ` ) ;
86
86
return resp . json ( ) ;
87
87
} catch ( error ) {
88
88
console . error ( `Unable to fetch credentials from AWS metadata store: ${ error } ` ) ;
Original file line number Diff line number Diff line change @@ -20,8 +20,8 @@ jest.mock('./aws-helper');
20
20
const MockedMinioClient : jest . Mock = MinioClient as any ;
21
21
22
22
describe ( 'createMinioClient' , ( ) => {
23
- afterEach ( ( ) => {
24
- MockedMinioClient . mockClear ( ) ;
23
+ beforeEach ( ( ) => {
24
+ ( MinioClient as any ) . mockClear ( ) ;
25
25
( awsInstanceProfileCredentials . getCredentials as jest . Mock ) . mockClear ( ) ;
26
26
( awsInstanceProfileCredentials . ok as jest . Mock ) . mockClear ( ) ;
27
27
} ) ;
You can’t perform that action at this time.
0 commit comments