Skip to content
Open

4.11.0 #2768

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
wrapperVersion=3.3.4
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip
22 changes: 14 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Whenever a 3rd party library is updated, S3Mock will update it's MINOR version.
* [PLANNED - 5.x - RELEASE TBD](#planned---5x---release-tbd)
* [Planned changes](#planned-changes)
* [CURRENT - 4.x - THIS VERSION IS UNDER ACTIVE DEVELOPMENT](#current---4x---this-version-is-under-active-development)
* [4.11.0 - PLANNED](#4110---planned)
* [4.11.0](#4110)
* [4.10.0](#4100)
* [4.9.1](#491)
* [4.9.0](#490)
Expand Down Expand Up @@ -152,21 +152,27 @@ Version 4.x is JDK17 LTS bytecode compatible, with Docker and JUnit / direct Jav

**The current major version 4 will receive new features, dependency updates and bug fixes on a continuous basis. We usually follow the Spring Boot release cycle.**

## 4.11.0 - PLANNED
## 4.11.0
Version 4.x is JDK17 LTS bytecode compatible, with Docker and JUnit / direct Java integration.

**This is currently the last planned minor release of 4.x.**
**This is the last planned minor release of 4.x.**

* Features and fixes
* TBD
* Support quiet parameter in DeleteObjects (fixes #2756)
* Refactorings
* TBD
* Version updates (deliverable dependencies)
* Update to Spring Boot 3.5.8
* Planned release November 20th 2025
* https://github.com/spring-projects/spring-boot/milestone/401
* Bump spring-boot.version from 3.5.7 to 3.5.8
* Bump org.apache.commons:commons-lang3 from 3.19.0 to 3.20.0
* Version updates (build dependencies)
* TBD
* Bump io.fabric8:docker-maven-plugin from 0.47.0 to 0.48.0
* Bump org.apache.maven.plugins:maven-release-plugin from 3.1.1 to 3.2.0
* Bump org.apache.maven.plugins:maven-jar-plugin from 3.4.2 to 3.5.0
* Bump actions/dependency-review-action from 4.8.1 to 4.8.2
* Bump com.puppycrawl.tools:checkstyle from 12.1.1 to 12.1.2
* Bump actions/checkout from 5.0.0 to 6.0.0
* Bump github/codeql-action from 4.31.2 to 4.31.4
* Bump maven wrapper from 3.3.3 to 3.3.4

## 4.10.0
Version 4.x is JDK17 LTS bytecode compatible, with Docker and JUnit / direct Java integration.
Expand Down
2 changes: 1 addition & 1 deletion docker/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>com.adobe.testing</groupId>
<artifactId>s3mock-parent</artifactId>
<version>4.10.1-SNAPSHOT</version>
<version>4.11.0-SNAPSHOT</version>
</parent>

<artifactId>s3mock-docker</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>com.adobe.testing</groupId>
<artifactId>s3mock-parent</artifactId>
<version>4.10.1-SNAPSHOT</version>
<version>4.11.0-SNAPSHOT</version>
</parent>

<artifactId>s3mock-integration-tests</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,46 @@ internal class GetPutDeleteObjectIT : S3TestBase() {
}.isInstanceOf(NoSuchKeyException::class.java)
}

@Test
@S3VerifiedSuccess(year = 2025)
fun testPutGetHeadDeleteObject_pathSegments(testInfo: TestInfo) {
val key = "/.././$UPLOAD_FILE_NAME"
val bucketName = givenBucket(testInfo)

s3Client.putObject(
{
it.bucket(bucketName)
it.key(key)
},
RequestBody.fromFile(UPLOAD_FILE),
)

s3Client.headObject {
it.bucket(bucketName)
it.key(key)
}

s3Client
.getObject {
it.bucket(bucketName)
it.key(key)
}.use {
assertThat(it.response().contentLength()).isEqualTo(UPLOAD_FILE_LENGTH)
}

s3Client.deleteObject {
it.bucket(bucketName)
it.key(key)
}

assertThatThrownBy {
s3Client.getObject {
it.bucket(bucketName)
it.key(key)
}
}.isInstanceOf(NoSuchKeyException::class.java)
}

@Test
@S3VerifiedSuccess(year = 2025)
fun testPutGetHeadDeleteObjects(testInfo: TestInfo) {
Expand Down Expand Up @@ -1559,6 +1599,29 @@ internal class GetPutDeleteObjectIT : S3TestBase() {
}
}

@Test
@S3VerifiedSuccess(year = 2025)
fun testGetObject_rangeDownloads_fail_emptyObject(testInfo: TestInfo) {
val bucketName = givenBucket(testInfo)
s3Client.putObject(
{
it.bucket(bucketName)
it.key(UPLOAD_FILE_NAME)
},
RequestBody.fromBytes(ByteArray(0)),
)
val smallRequestEndBytes = 2L

assertThatThrownBy {
s3Client.getObject {
it.bucket(bucketName)
it.key(UPLOAD_FILE_NAME)
it.range("bytes=-$smallRequestEndBytes")
}
}.isInstanceOf(S3Exception::class.java)
.hasMessageContaining("Service: S3, Status Code: 416")
}

@Test
@S3VerifiedSuccess(year = 2025)
fun testGetObject_rangeDownloads_finalBytes_prefixOffset(testInfo: TestInfo) {
Expand Down
2 changes: 1 addition & 1 deletion mvnw
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# ----------------------------------------------------------------------------

# ----------------------------------------------------------------------------
# Apache Maven Wrapper startup batch script, version 3.3.3
# Apache Maven Wrapper startup batch script, version 3.3.4
#
# Optional ENV vars
# -----------------
Expand Down
2 changes: 1 addition & 1 deletion mvnw.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
@REM ----------------------------------------------------------------------------

@REM ----------------------------------------------------------------------------
@REM Apache Maven Wrapper startup batch script, version 3.3.3
@REM Apache Maven Wrapper startup batch script, version 3.3.4
@REM
@REM Optional ENV vars
@REM MVNW_REPOURL - repo url base for downloading maven distribution
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

<groupId>com.adobe.testing</groupId>
<artifactId>s3mock-parent</artifactId>
<version>4.10.1-SNAPSHOT</version>
<version>4.11.0-SNAPSHOT</version>
<packaging>pom</packaging>

<name>S3Mock - Parent</name>
Expand Down Expand Up @@ -129,7 +129,7 @@
<!-- Run Docker build by default -->
<skipDocker>false</skipDocker>
<sortpom-maven-plugin.version>4.0.0</sortpom-maven-plugin.version>
<spring-boot.version>3.5.7</spring-boot.version>
<spring-boot.version>3.5.8</spring-boot.version>
<testcontainers.version>1.21.3</testcontainers.version>
<testng.version>7.11.0</testng.version>
<xmlunit-assertj3.version>2.11.0</xmlunit-assertj3.version>
Expand Down
2 changes: 1 addition & 1 deletion server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>com.adobe.testing</groupId>
<artifactId>s3mock-parent</artifactId>
<version>4.10.1-SNAPSHOT</version>
<version>4.11.0-SNAPSHOT</version>
</parent>

<artifactId>s3mock</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,59 @@ internal class ObjectControllerTest : BaseControllerTest() {
}


@Test
@Throws(Exception::class)
fun testPutObject_withPathsegments_Ok() {
givenBucket()
val key = ".././sampleFile.txt"

val testFile = File(UPLOAD_FILE_NAME)
val digest = DigestUtil.hexDigest(Files.newInputStream(testFile.toPath()))
val tempFile = Files.createTempFile("testPutObject_Ok", "").also {
testFile.copyTo(it.toFile(), overwrite = true)
}
whenever(
objectService.toTempFile(
any(
InputStream::class.java
), any(HttpHeaders::class.java)
)
)
.thenReturn(
FileChecksum(
tempFile,
DigestUtil.checksumFor(testFile.toPath(), DefaultChecksumAlgorithm.CRC32)
)
)

whenever(
objectService.putS3Object(
eq(TEST_BUCKET_NAME),
eq(key),
contains(MediaType.TEXT_PLAIN_VALUE),
anyMap(),
any(Path::class.java),
anyMap(),
anyMap(),
isNull(),
isNull(),
isNull(),
eq(Owner.DEFAULT_OWNER),
eq(StorageClass.STANDARD)
)
).thenReturn(s3ObjectMetadata(key, digest))

mockMvc.perform(
put("/test-bucket/$key")
.content(testFile.readBytes())
.contentType(MediaType.TEXT_PLAIN)
.accept(MediaType.APPLICATION_XML)
)
.andExpect(status().isOk)
.andExpect(header().string(HttpHeaders.ETAG, "\"$digest\""))
}


@Test
@Throws(Exception::class)
fun testPutObject_Options() {
Expand Down
2 changes: 1 addition & 1 deletion testsupport/common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>com.adobe.testing</groupId>
<artifactId>s3mock-testsupport-reactor</artifactId>
<version>4.10.1-SNAPSHOT</version>
<version>4.11.0-SNAPSHOT</version>
</parent>

<artifactId>s3mock-testsupport-common</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion testsupport/junit4/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>com.adobe.testing</groupId>
<artifactId>s3mock-testsupport-reactor</artifactId>
<version>4.10.1-SNAPSHOT</version>
<version>4.11.0-SNAPSHOT</version>
</parent>

<artifactId>s3mock-junit4</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion testsupport/junit5/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>com.adobe.testing</groupId>
<artifactId>s3mock-testsupport-reactor</artifactId>
<version>4.10.1-SNAPSHOT</version>
<version>4.11.0-SNAPSHOT</version>
</parent>

<artifactId>s3mock-junit5</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion testsupport/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>com.adobe.testing</groupId>
<artifactId>s3mock-parent</artifactId>
<version>4.10.1-SNAPSHOT</version>
<version>4.11.0-SNAPSHOT</version>
</parent>

<artifactId>s3mock-testsupport-reactor</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion testsupport/testcontainers/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>com.adobe.testing</groupId>
<artifactId>s3mock-testsupport-reactor</artifactId>
<version>4.10.1-SNAPSHOT</version>
<version>4.11.0-SNAPSHOT</version>
</parent>

<artifactId>s3mock-testcontainers</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion testsupport/testng/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>com.adobe.testing</groupId>
<artifactId>s3mock-testsupport-reactor</artifactId>
<version>4.10.1-SNAPSHOT</version>
<version>4.11.0-SNAPSHOT</version>
</parent>

<artifactId>s3mock-testng</artifactId>
Expand Down