Skip to content

Commit

Permalink
test(protocoltests): update S3 Client as per [email protected]
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr committed Jul 2, 2024
1 parent 882b3a1 commit ad85d41
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 32 deletions.
56 changes: 56 additions & 0 deletions private/aws-protocoltests-restxml-s3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,14 @@ XmlTimestamps

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/XmlTimestampsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/XmlTimestampsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/XmlTimestampsCommandOutput/)

</details>
<details>
<summary>
ContentTypeParameters
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/ContentTypeParametersCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/ContentTypeParametersCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/ContentTypeParametersCommandOutput/)

</details>
<details>
<summary>
Expand Down Expand Up @@ -536,6 +544,14 @@ SparseNullsOperation

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/SparseNullsOperationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/SparseNullsOperationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/SparseNullsOperationCommandOutput/)

</details>
<details>
<summary>
ContentTypeParameters
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/ContentTypeParametersCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/ContentTypeParametersCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/ContentTypeParametersCommandOutput/)

</details>
<details>
<summary>
Expand Down Expand Up @@ -944,6 +960,14 @@ ConstantQueryString

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/ConstantQueryStringCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/ConstantQueryStringCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/ConstantQueryStringCommandOutput/)

</details>
<details>
<summary>
ContentTypeParameters
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/ContentTypeParametersCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/ContentTypeParametersCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/ContentTypeParametersCommandOutput/)

</details>
<details>
<summary>
Expand Down Expand Up @@ -1536,6 +1560,22 @@ OmitsSerializingEmptyLists

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/OmitsSerializingEmptyListsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/OmitsSerializingEmptyListsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/OmitsSerializingEmptyListsCommandOutput/)

</details>
<details>
<summary>
OperationWithDefaults
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/OperationWithDefaultsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/OperationWithDefaultsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/OperationWithDefaultsCommandOutput/)

</details>
<details>
<summary>
OperationWithNestedStructure
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/OperationWithNestedStructureCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/OperationWithNestedStructureCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/OperationWithNestedStructureCommandOutput/)

</details>
<details>
<summary>
Expand Down Expand Up @@ -1664,6 +1704,14 @@ TestBodyStructure

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/TestBodyStructureCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/TestBodyStructureCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/TestBodyStructureCommandOutput/)

</details>
<details>
<summary>
TestNoInputNoPayload
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/TestNoInputNoPayloadCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/TestNoInputNoPayloadCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/TestNoInputNoPayloadCommandOutput/)

</details>
<details>
<summary>
Expand Down Expand Up @@ -1832,6 +1880,14 @@ ConstantQueryString

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/ConstantQueryStringCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/ConstantQueryStringCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/ConstantQueryStringCommandOutput/)

</details>
<details>
<summary>
ContentTypeParameters
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/ContentTypeParametersCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/ContentTypeParametersCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/ContentTypeParametersCommandOutput/)

</details>
<details>
<summary>
Expand Down
49 changes: 24 additions & 25 deletions private/aws-protocoltests-restxml-s3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@
"build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",
"build:types": "tsc -p tsconfig.types.json",
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
"clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0",
"test": "jest --coverage --passWithNoTests"
"clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0"
},
"main": "./dist-cjs/index.js",
"types": "./dist-types/index.d.ts",
"module": "./dist-es/index.js",
"sideEffects": false,
"dependencies": {
"@aws-crypto/sha256-browser": "3.0.0",
"@aws-crypto/sha256-js": "3.0.0",
"@aws-crypto/sha256-browser": "5.2.0",
"@aws-crypto/sha256-js": "5.2.0",
"@aws-sdk/client-sso-oidc": "*",
"@aws-sdk/client-sts": "*",
"@aws-sdk/core": "*",
Expand All @@ -36,30 +35,30 @@
"@aws-sdk/util-user-agent-browser": "*",
"@aws-sdk/util-user-agent-node": "*",
"@aws-sdk/xml-builder": "*",
"@smithy/config-resolver": "^3.0.1",
"@smithy/core": "^2.2.0",
"@smithy/fetch-http-handler": "^3.0.1",
"@smithy/hash-node": "^3.0.0",
"@smithy/invalid-dependency": "^3.0.0",
"@smithy/middleware-content-length": "^3.0.0",
"@smithy/middleware-endpoint": "^3.0.1",
"@smithy/middleware-retry": "^3.0.3",
"@smithy/middleware-serde": "^3.0.0",
"@smithy/middleware-stack": "^3.0.0",
"@smithy/node-config-provider": "^3.1.0",
"@smithy/node-http-handler": "^3.0.0",
"@smithy/protocol-http": "^4.0.0",
"@smithy/querystring-builder": "^3.0.0",
"@smithy/smithy-client": "^3.1.1",
"@smithy/types": "^3.0.0",
"@smithy/url-parser": "^3.0.0",
"@smithy/config-resolver": "^3.0.4",
"@smithy/core": "^2.2.4",
"@smithy/fetch-http-handler": "^3.2.0",
"@smithy/hash-node": "^3.0.3",
"@smithy/invalid-dependency": "^3.0.3",
"@smithy/middleware-content-length": "^3.0.3",
"@smithy/middleware-endpoint": "^3.0.4",
"@smithy/middleware-retry": "^3.0.7",
"@smithy/middleware-serde": "^3.0.3",
"@smithy/middleware-stack": "^3.0.3",
"@smithy/node-config-provider": "^3.1.3",
"@smithy/node-http-handler": "^3.1.1",
"@smithy/protocol-http": "^4.0.3",
"@smithy/querystring-builder": "^3.0.3",
"@smithy/smithy-client": "^3.1.5",
"@smithy/types": "^3.3.0",
"@smithy/url-parser": "^3.0.3",
"@smithy/util-base64": "^3.0.0",
"@smithy/util-body-length-browser": "^3.0.0",
"@smithy/util-body-length-node": "^3.0.0",
"@smithy/util-defaults-mode-browser": "^3.0.3",
"@smithy/util-defaults-mode-node": "^3.0.3",
"@smithy/util-middleware": "^3.0.0",
"@smithy/util-retry": "^3.0.0",
"@smithy/util-defaults-mode-browser": "^3.0.7",
"@smithy/util-defaults-mode-node": "^3.0.7",
"@smithy/util-middleware": "^3.0.3",
"@smithy/util-retry": "^3.0.3",
"@smithy/util-utf8": "^3.0.0",
"tslib": "^2.6.2",
"uuid": "^9.0.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,6 @@ it("S3PreservesLeadingDotSegmentInUriLabel:Request", async () => {
expect(r.method).toBe("GET");
expect(r.path).toBe("/../key.txt");

const queryString = buildQueryString(r.query);
expect(queryString).toContain("tagging");

expect(r.headers["host"]).toBeDefined();
expect(r.headers["host"]).toBe("mybucket.s3.us-west-2.amazonaws.com");

Expand Down Expand Up @@ -339,10 +336,7 @@ it("S3PreservesEmbeddedDotSegmentInUriLabel:Request", async () => {
}
const r = err.request;
expect(r.method).toBe("GET");
expect(r.path).toBe("foo/../key.txt");

const queryString = buildQueryString(r.query);
expect(queryString).toContain("tagging");
expect(r.path).toBe("/foo/../key.txt");

expect(r.headers["host"]).toBeDefined();
expect(r.headers["host"]).toBe("mybucket.s3.us-west-2.amazonaws.com");
Expand Down

0 comments on commit ad85d41

Please sign in to comment.