Skip to content

Commit

Permalink
test(client-s3): disable checksum calculation and validation in legac…
Browse files Browse the repository at this point in the history
…y tests (#6804)
  • Loading branch information
trivikr authored Jan 15, 2025
1 parent 473f949 commit ee6abd0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions features/s3/step_definitions/buckets.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ After({ tags: "@buckets" }, function (callback) {
Given("I am using the S3 {string} region", function (region, callback) {
this.s3 = new this.S3({
region: region,
requestChecksumCalculation: "WHEN_REQUIRED",
responseChecksumValidation: "WHEN_REQUIRED",
});
callback();
});
Expand Down Expand Up @@ -235,6 +237,8 @@ When("I create a bucket with a DNS compatible name that contains a dot", functio
Given("I force path style requests", function (callback) {
this.s3 = new this.S3({
forcePathStyle: true,
requestChecksumCalculation: "WHEN_REQUIRED",
responseChecksumValidation: "WHEN_REQUIRED",
});
callback();
});
Expand Down
2 changes: 2 additions & 0 deletions features/s3/step_definitions/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Before({ tags: "@s3" }, function (scenario, callback) {
const { S3 } = require("../../../clients/client-s3");
this.service = this.s3 = new S3({
maxRetries: 100,
requestChecksumCalculation: "WHEN_REQUIRED",
responseChecksumValidation: "WHEN_REQUIRED",
});
callback();
});
2 changes: 1 addition & 1 deletion features/s3/step_definitions/objects.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Then("the object {string} should contain {string}", function (key, contents, nex
});

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

Expand Down

0 comments on commit ee6abd0

Please sign in to comment.