fix(s3): allow upload up to 512MB by default. close #19 (#110)

* fix(s3): allow upload up to 512MB by default. close #19
This commit is contained in:
Hector Ventura authored and GitHub committed 2026-03-29 16:20:47 -05:00
1 parent 1377868094
commit 38912326c9
5 files changed
+46 -2

No files matched your search

@@ -6,6 +6,8 @@ import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestMethodOrder;
import java.util.Arrays;
import static io.restassured.RestAssured.given;
import static org.hamcrest.Matchers.*;
@@ -434,7 +436,7 @@ class S3IntegrationTest {
}
@Test
@Order(15)
@Order(16)
void getObjectAttributesRejectsUnknownSelector() {
given()
.header("x-amz-object-attributes", "ETag,UnknownThing")
@@ -446,6 +448,7 @@ class S3IntegrationTest {
}
@Test
@Order(17)
void getNonExistentBucket() {
given()
.when()
@@ -534,4 +537,37 @@ class S3IntegrationTest {
.statusCode(400)
.body(containsString("InvalidLocationConstraint"));
}
@Test
@Order(20)
void putLargeObject() {
// 22 MB – exceeds the old Jackson 20 MB maxStringLength default
byte[] largeBody = new byte[22 * 1024 * 1024];
Arrays.fill(largeBody, (byte) 'A');
given()
.when()
.put("/large-object-bucket")
.then()
.statusCode(200);
given()
.contentType("application/octet-stream")
.body(largeBody)
.when()
.put("/large-object-bucket/large-file.bin")
.then()
.statusCode(200)
.header("ETag", notNullValue());
given()
.when()
.get("/large-object-bucket/large-file.bin")
.then()
.statusCode(200)
.header("Content-Length", String.valueOf(largeBody.length));
given().delete("/large-object-bucket/large-file.bin");
given().delete("/large-object-bucket");
}
}