Conversation
Not all parameters are supported right now. Fixes #2200
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for POST object requests and enhances test coverage for large uploads via presigned URLs.
- Consolidates HTTP parameter constants for DELETE operations.
- Adds an overloaded toTempFile method in ServiceBase for processing POST object uploads.
- Implements the new postObject endpoint in ObjectController along with updated integration tests for both POST and PUT presigned URL workflows.
Reviewed Changes
Copilot reviewed 8 out of 20 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| server/src/main/java/com/adobe/testing/s3mock/util/AwsHttpParameters.java | Reorders and groups DELETE-related constants to support POST requests. |
| server/src/main/java/com/adobe/testing/s3mock/service/ServiceBase.java | Introduces a new toTempFile(InputStream) method for POST object handling. |
| server/src/main/java/com/adobe/testing/s3mock/ObjectController.java | Implements a new postObject endpoint for POST object requests. |
| server/src/main/java/com/adobe/testing/s3mock/BucketController.java | Cleans up unused import declarations. |
| integration-tests/src/test/kotlin/com/adobe/testing/s3mock/its/S3TestBase.kt | Adjusts test utilities and adds S3PostObjectPresigner support. |
| integration-tests/src/test/kotlin/com/adobe/testing/s3mock/its/PresignedUrlIT.kt | Adds integration tests for both POST and PUT presigned URL operations. |
| README.md | Updates documentation to reflect support for PostObject. |
| CHANGELOG.md | Updates changelog for the 4.1.0 release. |
Files not reviewed (12)
- build-config/pom.xml: Language not supported
- docker/pom.xml: Language not supported
- integration-tests/pom.xml: Language not supported
- pom.xml: Language not supported
- server/pom.xml: Language not supported
- server/src/main/resources/application.properties: Language not supported
- testsupport/common/pom.xml: Language not supported
- testsupport/junit4/pom.xml: Language not supported
- testsupport/junit5/pom.xml: Language not supported
- testsupport/pom.xml: Language not supported
- testsupport/testcontainers/pom.xml: Language not supported
- testsupport/testng/pom.xml: Language not supported
Comments suppressed due to low confidence (2)
server/src/main/java/com/adobe/testing/s3mock/util/AwsHttpParameters.java:37
- [nitpick] Consider grouping the DELETE constant declaration together with its corresponding NOT_DELETE constant to improve code clarity and maintainability.
public static final String DELETE = "delete";
integration-tests/src/test/kotlin/com/adobe/testing/s3mock/its/PresignedUrlIT.kt:86
- [nitpick] Using randomMBytes.inputStream() multiple times to compute the digest may introduce issues if the underlying source is not repeatable. Consider computing and caching the digest once for use in subsequent comparisons to improve test stability.
val expectedEtag = "\"${DigestUtil.hexDigest(randomMBytes.inputStream())}\""
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Not all parameters are supported right now.
Also adds tests for large uploads through presigned URLs.
Related Issue
Fixes #2200
Tasks