Merged
Conversation
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.
Related issue
No specific issue. This follows the test-gap automation for recent bucket CORS changes.
Background
Recent work added bucket CORS management through the S3 adapter. Existing unit coverage checked the core rule conversion and XML parsing paths, but did not assert that
set_bucket_corsactually sends the expected PUT request and serialized CORS rule fields to the backend.Root cause
The request-building path was only covered indirectly. A regression in the SDK request wiring, subresource URI, or serialized CORS fields could pass the existing conversion tests while still producing an incorrect backend request.
Solution
Added a focused S3 client unit test that captures the
set_bucket_corsrequest and verifies the PUT method, CORS subresource URI, and serialized rule fields including ID, origins, methods, allowed headers, exposed headers, and max age seconds.Validation
cargo test -p rc-s3 set_bucket_cors_sends_rule_fieldscargo fmt --all --checkcargo fmt --all && cargo clippy --workspace -- -D warningscargo test --workspacemake pre-commitwas requested but this repository does not contain a Makefile or apre-committarget, so the equivalent required Rust checks above were run directly.