Skip to content

Commit 0131280

Browse files
authoredDec 13, 2024··
test(credential-provider-ini): set profile in integ test (#6732)
1 parent a65995f commit 0131280

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed
 

Diff for: ‎packages/credential-provider-ini/src/fromIni.integ.spec.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { HttpRequest, HttpResponse } from "@smithy/protocol-http";
33
import { SourceProfileInit } from "@smithy/shared-ini-file-loader";
44
import type { NodeHttpHandlerOptions, ParsedIniData } from "@smithy/types";
55
import { PassThrough } from "node:stream";
6-
import { beforeEach, describe, expect, test as it, vi } from "vitest";
6+
import { afterEach, beforeEach, describe, expect, test as it, vi } from "vitest";
77

88
import { fromIni } from "./fromIni";
99

@@ -133,6 +133,7 @@ class MockNodeHttpHandler {
133133

134134
describe("fromIni region search order", () => {
135135
beforeEach(() => {
136+
process.env.AWS_PROFILE = "default";
136137
iniProfileData = {
137138
default: {
138139
region: "us-west-2",
@@ -153,6 +154,10 @@ describe("fromIni region search order", () => {
153154
});
154155
});
155156

157+
afterEach(() => {
158+
delete process.env.AWS_PROFILE;
159+
});
160+
156161
it("should use 1st priority for the clientConfig given to the provider factory", async () => {
157162
const sts = new STS({
158163
requestHandler: new MockNodeHttpHandler(),

0 commit comments

Comments
 (0)
Please sign in to comment.