From d367f467d3baff15afeadc8fe3b015f7b8a71886 Mon Sep 17 00:00:00 2001 From: Eric Villa Date: Thu, 7 Mar 2024 10:05:07 +0100 Subject: [PATCH] test: fixed aws core service tests --- packages/core/src/services/aws-core-service.spec.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/core/src/services/aws-core-service.spec.ts b/packages/core/src/services/aws-core-service.spec.ts index a2a3ca3df..03bf044b4 100644 --- a/packages/core/src/services/aws-core-service.spec.ts +++ b/packages/core/src/services/aws-core-service.spec.ts @@ -15,9 +15,10 @@ describe("AwsCoreService", () => { writeFileSync: jest.fn((_file, _data) => {}), }, } as any; + const httpHandler = {} as any; test("getRegions", () => { - const awsCoreService = new AwsCoreService(null, null); + const awsCoreService = new AwsCoreService(httpHandler, null, null); expect(awsCoreService.getRegions()).toEqual([ { @@ -114,22 +115,22 @@ describe("AwsCoreService", () => { }); test("awsCredentialPath", () => { - const awsCoreService = new AwsCoreService(nativeService, null); + const awsCoreService = new AwsCoreService(httpHandler, nativeService, null); expect(awsCoreService.awsCredentialPath()).toBe(nativeService.path.join(`${homedir}`, `.aws`, `credentials`)); }); test("awsBkpCredentialPath", () => { - const awsCoreService = new AwsCoreService(nativeService, null); + const awsCoreService = new AwsCoreService(httpHandler, nativeService, null); expect(awsCoreService.awsBkpCredentialPath()).toBe(nativeService.path.join(`${homedir}`, `.aws`, `credentials.bkp`)); }); test("awsConfigPath", () => { - const awsCoreService = new AwsCoreService(nativeService, null); + const awsCoreService = new AwsCoreService(httpHandler, nativeService, null); expect(awsCoreService.awsConfigPath()).toBe(nativeService.path.join(`${homedir}`, `.aws`, `config`)); }); test("awsBkpConfigPath", () => { - const awsCoreService = new AwsCoreService(nativeService, null); + const awsCoreService = new AwsCoreService(httpHandler, nativeService, null); expect(awsCoreService.awsBkpConfigPath()).toBe(nativeService.path.join(`${homedir}`, `.aws`, `config.bkp`)); }); @@ -142,7 +143,7 @@ describe("AwsCoreService", () => { const session2 = { region: undefined, } as any; - const awsCoreService = new AwsCoreService(nativeService, null); + const awsCoreService = new AwsCoreService(httpHandler, nativeService, null); const result = awsCoreService.stsOptions(session); expect(result).toStrictEqual({ maxRetries: 0,