Skip to content

Commit 182831d

Browse files
committed
test(client-s3): disable checksum calculation and validation in legacy tests
1 parent 473f949 commit 182831d

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

features/s3/step_definitions/buckets.js

Lines changed: 5 additions & 0 deletions
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
});
@@ -31,6 +33,7 @@ Given(
3133
this.s3 = new this.S3({
3234
region: region,
3335
signatureVersion: signatureVersion,
36+
requestChecksumCalculation: "WHEN_REQUIRED",
3437
});
3538
callback();
3639
}
@@ -235,6 +238,8 @@ When("I create a bucket with a DNS compatible name that contains a dot", functio
235238
Given("I force path style requests", function (callback) {
236239
this.s3 = new this.S3({
237240
forcePathStyle: true,
241+
requestChecksumCalculation: "WHEN_REQUIRED",
242+
responseChecksumValidation: "WHEN_REQUIRED",
238243
});
239244
callback();
240245
});

features/s3/step_definitions/hooks.js

Lines changed: 2 additions & 0 deletions
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
});

features/s3/step_definitions/objects.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ When("I put {string} to the key {string} with ContentLength {int}", function (co
8383
};
8484
this.s3nochecksums = new this.S3({
8585
computeChecksums: false,
86+
requestChecksumCalculation: "WHEN_REQUIRED",
87+
responseChecksumValidation: "WHEN_REQUIRED",
8688
});
8789
this.request("s3nochecksums", "putObject", params, next);
8890
});
@@ -95,7 +97,7 @@ Then("the object {string} should contain {string}", function (key, contents, nex
9597
});
9698

9799
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);
100+
this.assert.equal(this.data.ContentLength, contentLength);
99101
next();
100102
});
101103

features/s3/step_definitions/proxy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Before({ tags: "@s3 or @proxy" }, function (scenario, callback) {
1616
});
1717

1818
Then("I teardown the local proxy server", function (callback) {
19-
this.service = this.s3 = new this.S3();
19+
this.service = this.s3 = new this.S3({});
2020
this.proxyServer.close(callback);
2121
});
2222

0 commit comments

Comments
 (0)