Skip to content

test(s3): cover bucket cors set request#132

Merged
overtrue merged 1 commit intomainfrom
codex/test-gap-detection
Apr 19, 2026
Merged

test(s3): cover bucket cors set request#132
overtrue merged 1 commit intomainfrom
codex/test-gap-detection

Conversation

@overtrue
Copy link
Copy Markdown
Contributor

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_cors actually 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_cors request 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_fields

cargo fmt --all --check

cargo fmt --all && cargo clippy --workspace -- -D warnings

cargo test --workspace

make pre-commit was requested but this repository does not contain a Makefile or a pre-commit target, so the equivalent required Rust checks above were run directly.

@overtrue overtrue marked this pull request as ready for review April 19, 2026 15:01
@overtrue overtrue merged commit cd99211 into main Apr 19, 2026
15 checks passed
@overtrue overtrue deleted the codex/test-gap-detection branch April 19, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant