test(s3): cover list versions NotFound fallback#169
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a focused regression test in rc-s3 for the list_object_versions_page missing-bucket error path, ensuring the recently introduced NotFound fallback remains covered in the S3 client’s error mapping.
Changes:
- Adds a new async unit test for
list_object_versions_pagewith a404+x-amz-error-code: NotFoundresponse. - Verifies the client returns
Error::NotFoundwith the expected bucket-specific message. - Extends existing nearby regression coverage for related S3 error-mapping behavior.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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 external issue. This is a focused test-gap follow-up for the recently merged S3 version-listing error handling.
Background
Recent changes made
list_object_versions_pagepreserve backend error codes so missing buckets map toError::NotFound. The existing regression coverage exercisedNoSuchBucket, while the siblingNotFoundfallback branch remained uncovered.Solution
Add a narrow rc-s3 unit test that feeds a 404 response with
x-amz-error-code: NotFoundintolist_object_versions_pageand asserts it returnsError::NotFoundwith the expected bucket message.Validation
cargo test -p rc-s3 list_object_versions_page_maps_not_found_code_to_not_found --libmake pre-commit