Apply suggestions from code review

Co-authored-by: Himanshu Mishra <himanshu@orkohunter.net>
Signed-off-by: Jonah Back <jonah@jonahback.com>
This commit is contained in:
Jonah Back
2021-03-04 15:19:24 -08:00
committed by Jonah Back
parent 5d7834baf0
commit 401698abc1
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -2,4 +2,4 @@
'@backstage/plugin-kubernetes-backend': patch
---
Use AWS SDK V2 for Kubernetes authentication
Use AWS SDK V2 instead of V3 for Kubernetes authentication
@@ -46,6 +46,6 @@ describe('AwsIamKubernetesAuthTranslator tests', () => {
url: '',
authProvider: 'aws',
});
await expect(promise).rejects.toThrow('no credentials found');
await expect(promise).rejects.toThrow('no AWS credentials found.');
});
});
@@ -34,7 +34,7 @@ export class AwsIamKubernetesAuthTranslator
async getBearerToken(clusterName: string): Promise<string> {
const credentials = AWS.config.credentials;
if (!(credentials instanceof Credentials)) {
throw new Error('no credentials found');
throw new Error('no AWS credentials found.');
}
await credentials.getPromise();
const request = {