Skip to content

test(credential-provider-ini): set profile in integ test #6732

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { HttpRequest, HttpResponse } from "@smithy/protocol-http";
import { SourceProfileInit } from "@smithy/shared-ini-file-loader";
import type { NodeHttpHandlerOptions, ParsedIniData } from "@smithy/types";
import { PassThrough } from "node:stream";
import { beforeEach, describe, expect, test as it, vi } from "vitest";
import { afterEach, beforeEach, describe, expect, test as it, vi } from "vitest";

import { fromIni } from "./fromIni";

Expand Down Expand Up @@ -133,6 +133,7 @@ class MockNodeHttpHandler {

describe("fromIni region search order", () => {
beforeEach(() => {
process.env.AWS_PROFILE = "default";
iniProfileData = {
default: {
region: "us-west-2",
Expand All @@ -153,6 +154,10 @@ describe("fromIni region search order", () => {
});
});

afterEach(() => {
delete process.env.AWS_PROFILE;
});

it("should use 1st priority for the clientConfig given to the provider factory", async () => {
const sts = new STS({
requestHandler: new MockNodeHttpHandler(),
Expand Down
Loading