Skip to content

Commit ee6abd0

Browse files
authored
test(client-s3): disable checksum calculation and validation in legacy tests (#6804)
1 parent 473f949 commit ee6abd0

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

Diff for: features/s3/step_definitions/buckets.js

+4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ After({ tags: "@buckets" }, function (callback) {
2121
Given("I am using the S3 {string} region", function (region, callback) {
2222
this.s3 = new this.S3({
2323
region: region,
24+
requestChecksumCalculation: "WHEN_REQUIRED",
25+
responseChecksumValidation: "WHEN_REQUIRED",
2426
});
2527
callback();
2628
});
@@ -235,6 +237,8 @@ When("I create a bucket with a DNS compatible name that contains a dot", functio
235237
Given("I force path style requests", function (callback) {
236238
this.s3 = new this.S3({
237239
forcePathStyle: true,
240+
requestChecksumCalculation: "WHEN_REQUIRED",
241+
responseChecksumValidation: "WHEN_REQUIRED",
238242
});
239243
callback();
240244
});

Diff for: features/s3/step_definitions/hooks.js

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Before({ tags: "@s3" }, function (scenario, callback) {
44
const { S3 } = require("../../../clients/client-s3");
55
this.service = this.s3 = new S3({
66
maxRetries: 100,
7+
requestChecksumCalculation: "WHEN_REQUIRED",
8+
responseChecksumValidation: "WHEN_REQUIRED",
79
});
810
callback();
911
});

Diff for: features/s3/step_definitions/objects.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Then("the object {string} should contain {string}", function (key, contents, nex
9595
});
9696

9797
Then("the HTTP response should have a content length of {int}", function (contentLength, next) {
98-
this.assert.equal(this.data.Body.headers["content-length"], contentLength);
98+
this.assert.equal(this.data.ContentLength, contentLength);
9999
next();
100100
});
101101

0 commit comments

Comments
 (0)