Skip to content

Commit 4e1950f

Browse files
smilkurikuhe
authored andcommitted
feat(credential-providers): fix staging tests
1 parent e49a0f1 commit 4e1950f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/credential-providers/src/resolveAwsCliV2Region.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ describe("AWS Region Resolution", () => {
4141
});
4242

4343
it("should use defaultRegion when no other source is available", async () => {
44+
delete process.env.AWS_REGION;
45+
delete process.env.AWS_DEFAULT_REGION;
4446
// Mock loadSharedConfigFiles to return empty configuration
4547
vi.mocked(loadSharedConfigFiles).mockResolvedValue({
4648
configFile: {},
@@ -53,6 +55,8 @@ describe("AWS Region Resolution", () => {
5355
});
5456

5557
it("should return undefined when no region is available and no default region is provided", async () => {
58+
delete process.env.AWS_REGION;
59+
delete process.env.AWS_DEFAULT_REGION;
5660
// Mock loadSharedConfigFiles to return empty configuration
5761
vi.mocked(loadSharedConfigFiles).mockResolvedValue({
5862
configFile: {},
@@ -65,6 +69,8 @@ describe("AWS Region Resolution", () => {
6569
});
6670

6771
it("should use specified profile", async () => {
72+
delete process.env.AWS_REGION;
73+
delete process.env.AWS_DEFAULT_REGION;
6874
vi.mocked(loadSharedConfigFiles).mockResolvedValue({
6975
configFile: {
7076
"custom-profile": {

0 commit comments

Comments
 (0)