Skip to content

Commit ea0ec0e

Browse files
authored
Merge pull request #2768 from adobe/4.11.0-maintenance
4.11.0
2 parents 806b0fe + dde3f03 commit ea0ec0e

File tree

16 files changed

+152
-23
lines changed

16 files changed

+152
-23
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
wrapperVersion=3.3.4
12
distributionType=only-script
23
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip

CHANGELOG.md

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Whenever a 3rd party library is updated, S3Mock will update it's MINOR version.
88
* [PLANNED - 5.x - RELEASE TBD](#planned---5x---release-tbd)
99
* [Planned changes](#planned-changes)
1010
* [CURRENT - 4.x - THIS VERSION IS UNDER ACTIVE DEVELOPMENT](#current---4x---this-version-is-under-active-development)
11-
* [4.11.0 - PLANNED](#4110---planned)
11+
* [4.11.0](#4110)
1212
* [4.10.0](#4100)
1313
* [4.9.1](#491)
1414
* [4.9.0](#490)
@@ -152,21 +152,33 @@ Version 4.x is JDK17 LTS bytecode compatible, with Docker and JUnit / direct Jav
152152

153153
**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.**
154154

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

158-
**This is currently the last planned minor release of 4.x.**
158+
**This is the last planned minor release of 4.x.**
159159

160160
* Features and fixes
161-
* TBD
162-
* Refactorings
163-
* TBD
161+
* Support quiet parameter in DeleteObjects (fixes #2756)
164162
* Version updates (deliverable dependencies)
165-
* Update to Spring Boot 3.5.8
166-
* Planned release November 20th 2025
167-
* https://github.com/spring-projects/spring-boot/milestone/401
163+
* Bump spring-boot.version from 3.5.7 to 3.5.8
164+
* Bump aws-v2.version from 2.38.1 to 2.40.0
165+
* Bump aws.version from 1.12.793 to 1.12.794
166+
* Bump org.apache.commons:commons-lang3 from 3.19.0 to 3.20.0
167+
* Bump alpine from 3.22.2 to 3.23.0 in /docker
168168
* Version updates (build dependencies)
169-
* TBD
169+
* Bump aws.sdk.kotlin:s3-jvm from 1.5.77 to 1.5.95
170+
* Bump io.fabric8:docker-maven-plugin from 0.47.0 to 0.48.0
171+
* Bump org.apache.maven.plugins:maven-release-plugin from 3.1.1 to 3.3.0
172+
* Bump org.apache.maven.plugins:maven-jar-plugin from 3.4.2 to 3.5.0
173+
* Bump org.apache.maven.plugins:maven-source-plugin from 3.3.1 to 3.4.0
174+
* Bump org.apache.maven.plugins:maven-resources-plugin from 3.3.1 to 3.4.0
175+
* Bump actions/stale from 10.1.0 to 10.1.1
176+
* Bump actions/dependency-review-action from 4.8.1 to 4.8.2
177+
* Bump com.puppycrawl.tools:checkstyle from 12.1.1 to 12.2.0
178+
* Bump actions/checkout from 5.0.0 to 6.0.1
179+
* Bump github/codeql-action from 4.31.2 to 4.31.6
180+
* Bump step-security/harden-runner from 2.13.2 to 2.13.3
181+
* Bump maven wrapper from 3.3.3 to 3.3.4
170182

171183
## 4.10.0
172184
Version 4.x is JDK17 LTS bytecode compatible, with Docker and JUnit / direct Java integration.

docker/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>com.adobe.testing</groupId>
2424
<artifactId>s3mock-parent</artifactId>
25-
<version>4.10.1-SNAPSHOT</version>
25+
<version>4.11.0-SNAPSHOT</version>
2626
</parent>
2727

2828
<artifactId>s3mock-docker</artifactId>

integration-tests/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>com.adobe.testing</groupId>
2424
<artifactId>s3mock-parent</artifactId>
25-
<version>4.10.1-SNAPSHOT</version>
25+
<version>4.11.0-SNAPSHOT</version>
2626
</parent>
2727

2828
<artifactId>s3mock-integration-tests</artifactId>

integration-tests/src/test/kotlin/com/adobe/testing/s3mock/its/GetPutDeleteObjectIT.kt

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,46 @@ internal class GetPutDeleteObjectIT : S3TestBase() {
9797
}.isInstanceOf(NoSuchKeyException::class.java)
9898
}
9999

100+
@Test
101+
@S3VerifiedSuccess(year = 2025)
102+
fun testPutGetHeadDeleteObject_pathSegments(testInfo: TestInfo) {
103+
val key = "/.././$UPLOAD_FILE_NAME"
104+
val bucketName = givenBucket(testInfo)
105+
106+
s3Client.putObject(
107+
{
108+
it.bucket(bucketName)
109+
it.key(key)
110+
},
111+
RequestBody.fromFile(UPLOAD_FILE),
112+
)
113+
114+
s3Client.headObject {
115+
it.bucket(bucketName)
116+
it.key(key)
117+
}
118+
119+
s3Client
120+
.getObject {
121+
it.bucket(bucketName)
122+
it.key(key)
123+
}.use {
124+
assertThat(it.response().contentLength()).isEqualTo(UPLOAD_FILE_LENGTH)
125+
}
126+
127+
s3Client.deleteObject {
128+
it.bucket(bucketName)
129+
it.key(key)
130+
}
131+
132+
assertThatThrownBy {
133+
s3Client.getObject {
134+
it.bucket(bucketName)
135+
it.key(key)
136+
}
137+
}.isInstanceOf(NoSuchKeyException::class.java)
138+
}
139+
100140
@Test
101141
@S3VerifiedSuccess(year = 2025)
102142
fun testPutGetHeadDeleteObjects(testInfo: TestInfo) {
@@ -1559,6 +1599,29 @@ internal class GetPutDeleteObjectIT : S3TestBase() {
15591599
}
15601600
}
15611601

1602+
@Test
1603+
@S3VerifiedSuccess(year = 2025)
1604+
fun testGetObject_rangeDownloads_fail_emptyObject(testInfo: TestInfo) {
1605+
val bucketName = givenBucket(testInfo)
1606+
s3Client.putObject(
1607+
{
1608+
it.bucket(bucketName)
1609+
it.key(UPLOAD_FILE_NAME)
1610+
},
1611+
RequestBody.fromBytes(ByteArray(0)),
1612+
)
1613+
val smallRequestEndBytes = 2L
1614+
1615+
assertThatThrownBy {
1616+
s3Client.getObject {
1617+
it.bucket(bucketName)
1618+
it.key(UPLOAD_FILE_NAME)
1619+
it.range("bytes=-$smallRequestEndBytes")
1620+
}
1621+
}.isInstanceOf(S3Exception::class.java)
1622+
.hasMessageContaining("Service: S3, Status Code: 416")
1623+
}
1624+
15621625
@Test
15631626
@S3VerifiedSuccess(year = 2025)
15641627
fun testGetObject_rangeDownloads_finalBytes_prefixOffset(testInfo: TestInfo) {

mvnw

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mvnw.cmd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
<groupId>com.adobe.testing</groupId>
2323
<artifactId>s3mock-parent</artifactId>
24-
<version>4.10.1-SNAPSHOT</version>
24+
<version>4.11.0-SNAPSHOT</version>
2525
<packaging>pom</packaging>
2626

2727
<name>S3Mock - Parent</name>
@@ -129,7 +129,7 @@
129129
<!-- Run Docker build by default -->
130130
<skipDocker>false</skipDocker>
131131
<sortpom-maven-plugin.version>4.0.0</sortpom-maven-plugin.version>
132-
<spring-boot.version>3.5.7</spring-boot.version>
132+
<spring-boot.version>3.5.8</spring-boot.version>
133133
<testcontainers.version>1.21.3</testcontainers.version>
134134
<testng.version>7.11.0</testng.version>
135135
<xmlunit-assertj3.version>2.11.0</xmlunit-assertj3.version>

server/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>com.adobe.testing</groupId>
2424
<artifactId>s3mock-parent</artifactId>
25-
<version>4.10.1-SNAPSHOT</version>
25+
<version>4.11.0-SNAPSHOT</version>
2626
</parent>
2727

2828
<artifactId>s3mock</artifactId>

server/src/test/kotlin/com/adobe/testing/s3mock/ObjectControllerTest.kt

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,59 @@ internal class ObjectControllerTest : BaseControllerTest() {
146146
}
147147

148148

149+
@Test
150+
@Throws(Exception::class)
151+
fun testPutObject_withPathsegments_Ok() {
152+
givenBucket()
153+
val key = ".././sampleFile.txt"
154+
155+
val testFile = File(UPLOAD_FILE_NAME)
156+
val digest = DigestUtil.hexDigest(Files.newInputStream(testFile.toPath()))
157+
val tempFile = Files.createTempFile("testPutObject_Ok", "").also {
158+
testFile.copyTo(it.toFile(), overwrite = true)
159+
}
160+
whenever(
161+
objectService.toTempFile(
162+
any(
163+
InputStream::class.java
164+
), any(HttpHeaders::class.java)
165+
)
166+
)
167+
.thenReturn(
168+
FileChecksum(
169+
tempFile,
170+
DigestUtil.checksumFor(testFile.toPath(), DefaultChecksumAlgorithm.CRC32)
171+
)
172+
)
173+
174+
whenever(
175+
objectService.putS3Object(
176+
eq(TEST_BUCKET_NAME),
177+
eq(key),
178+
contains(MediaType.TEXT_PLAIN_VALUE),
179+
anyMap(),
180+
any(Path::class.java),
181+
anyMap(),
182+
anyMap(),
183+
isNull(),
184+
isNull(),
185+
isNull(),
186+
eq(Owner.DEFAULT_OWNER),
187+
eq(StorageClass.STANDARD)
188+
)
189+
).thenReturn(s3ObjectMetadata(key, digest))
190+
191+
mockMvc.perform(
192+
put("/test-bucket/$key")
193+
.content(testFile.readBytes())
194+
.contentType(MediaType.TEXT_PLAIN)
195+
.accept(MediaType.APPLICATION_XML)
196+
)
197+
.andExpect(status().isOk)
198+
.andExpect(header().string(HttpHeaders.ETAG, "\"$digest\""))
199+
}
200+
201+
149202
@Test
150203
@Throws(Exception::class)
151204
fun testPutObject_Options() {

0 commit comments

Comments
 (0)