diff --git a/clients/client-s3/test/e2e/S3.browser.e2e.spec.ts b/clients/client-s3/test/e2e/S3.browser.e2e.spec.ts index 5f90c00f9494..11724033d1c7 100644 --- a/clients/client-s3/test/e2e/S3.browser.e2e.spec.ts +++ b/clients/client-s3/test/e2e/S3.browser.e2e.spec.ts @@ -1,11 +1,11 @@ -import type { S3, SelectObjectContentEventStream } from "@aws-sdk/client-s3"; +import type { S3, SelectObjectContentEventStream, waitUntilObjectExists } from "@aws-sdk/client-s3"; import { fromNodeProviderChain } from "@aws-sdk/credential-providers"; import { FetchHttpHandler } from "@smithy/fetch-http-handler"; import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, onTestFailed, test as it } from "vitest"; import { getIntegTestResources } from "../../../../tests/e2e/get-integ-test-resources"; import { getRuntimeConfig } from "../../src/runtimeConfig.browser"; -import { S3 as S3Impl, waitUntilObjectExists } from "../browser-build/browser-s3-bundle"; +import { S3 as S3Impl, waitUntilObjectExists as waitUntilObjectExistsImpl } from "../browser-build/browser-s3-bundle"; import { createBuffer } from "./helpers"; describe("@aws-sdk/client-s3", () => { @@ -242,8 +242,8 @@ describe("@aws-sdk/client-s3", () => { }); expect(completeResult.$metadata.httpStatusCode).toEqual(200); - //validate the object is uploaded - const waiterState = await waitUntilObjectExists( + // validate the object is uploaded + const waiterState = await (waitUntilObjectExistsImpl as typeof waitUntilObjectExists)( { client, maxWaitTime: 60, diff --git a/packages/credential-provider-node/src/credential-provider-node.integ.spec.ts b/packages/credential-provider-node/src/credential-provider-node.integ.spec.ts index 63eb261cc41b..68e14f627a26 100644 --- a/packages/credential-provider-node/src/credential-provider-node.integ.spec.ts +++ b/packages/credential-provider-node/src/credential-provider-node.integ.spec.ts @@ -293,6 +293,17 @@ describe("credential-provider-node integration test", () => { aws_secret_access_key: "INI_STATIC_SECRET_KEY", }); + sts = new STS({ + region: "us-west-2", + logger: { + trace() {}, + debug() {}, + info() {}, + warn() {}, + error() {}, + }, + }); + await sts.getCallerIdentity({}); const credentials = await sts.config.credentials(); diff --git a/packages/middleware-sdk-s3/src/s3-express/middleware-s3-express.integ.spec.ts b/packages/middleware-sdk-s3/src/s3-express/middleware-s3-express.integ.spec.ts index 6273d3938f53..ac069197b867 100644 --- a/packages/middleware-sdk-s3/src/s3-express/middleware-s3-express.integ.spec.ts +++ b/packages/middleware-sdk-s3/src/s3-express/middleware-s3-express.integ.spec.ts @@ -1,6 +1,6 @@ import { S3 } from "@aws-sdk/client-s3"; -import { AwsCredentialIdentity } from "@aws-sdk/types"; -import { describe, expect, expect, test as it } from "vitest"; +import { AwsCredentialIdentity, AwsSdkFeatures } from "@aws-sdk/types"; +import { describe, expect, test as it } from "vitest"; import { requireRequestsFrom } from "../../../../private/aws-util-test/src"; import { S3ExpressIdentity, S3ExpressIdentityProvider } from "./index"; @@ -94,7 +94,10 @@ describe("middleware-s3-express", () => { requireRequestsFrom(client).toMatch({ headers: { - "user-agent": /(.*?) m\/(.*?)J(.*?)$/, + ["user-agent"](ua) { + const metadata = ua.match(/(.*?) m\/(.*?)$/)[2]; + expect(metadata).toContain("J" as AwsSdkFeatures["S3_EXPRESS_BUCKET"]); + }, }, }); diff --git a/packages/middleware-user-agent/src/middleware-user-agent.integ.spec.ts b/packages/middleware-user-agent/src/middleware-user-agent.integ.spec.ts index 657c7b81ca18..5c6b8e881789 100644 --- a/packages/middleware-user-agent/src/middleware-user-agent.integ.spec.ts +++ b/packages/middleware-user-agent/src/middleware-user-agent.integ.spec.ts @@ -1,7 +1,8 @@ import { CodeCatalyst } from "@aws-sdk/client-codecatalyst"; import { DynamoDB } from "@aws-sdk/client-dynamodb"; import { DynamoDBDocument } from "@aws-sdk/lib-dynamodb"; -import { describe, test as it } from "vitest"; +import { AwsSdkFeatures } from "@aws-sdk/types"; +import { describe, expect, test as it } from "vitest"; import { requireRequestsFrom } from "../../../private/aws-util-test/src"; @@ -38,7 +39,13 @@ describe("middleware-user-agent", () => { requireRequestsFrom(doc).toMatch({ headers: { - "user-agent": /(.*?) m\/d,E,O,R$/, + ["user-agent"](ua) { + const metadata = ua.match(/(.*?) m\/(.*?)$/)[2]; + expect(metadata).toContain("d" as AwsSdkFeatures["DDB_MAPPER"]); + expect(metadata).toContain("E" as AwsSdkFeatures["RETRY_MODE_STANDARD"]); + expect(metadata).toContain("O" as AwsSdkFeatures["ACCOUNT_ID_ENDPOINT"]); + expect(metadata).toContain("R" as AwsSdkFeatures["ACCOUNT_ID_MODE_REQUIRED"]); + }, }, }); diff --git a/private/aws-util-test/src/requests/test-http-handler.integ.spec.ts b/private/aws-util-test/src/requests/test-http-handler.integ.spec.ts index 9c7f54f5bafe..85d8a8697da8 100644 --- a/private/aws-util-test/src/requests/test-http-handler.integ.spec.ts +++ b/private/aws-util-test/src/requests/test-http-handler.integ.spec.ts @@ -1,4 +1,4 @@ -import { test as it, describe, expect } from "vitest"; +import { describe, expect, test as it } from "vitest"; // import { JsonProtocol } from "@aws-sdk/aws-protocoltests-json"; // CI has difficult importing a named private client from the workspace.