Skip to content

test(s3): cover list versions NotFound fallback#169

Merged
overtrue merged 1 commit intomainfrom
codex/test-list-versions-notfound-fallback
May 5, 2026
Merged

test(s3): cover list versions NotFound fallback#169
overtrue merged 1 commit intomainfrom
codex/test-list-versions-notfound-fallback

Conversation

@overtrue
Copy link
Copy Markdown
Contributor

@overtrue overtrue commented May 5, 2026

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_page preserve backend error codes so missing buckets map to Error::NotFound. The existing regression coverage exercised NoSuchBucket, while the sibling NotFound fallback branch remained uncovered.

Solution

Add a narrow rc-s3 unit test that feeds a 404 response with x-amz-error-code: NotFound into list_object_versions_page and asserts it returns Error::NotFound with the expected bucket message.

Validation

  • cargo test -p rc-s3 list_object_versions_page_maps_not_found_code_to_not_found --lib
  • make pre-commit

@overtrue overtrue marked this pull request as ready for review May 5, 2026 05:15
Copilot AI review requested due to automatic review settings May 5, 2026 05:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_page with a 404 + x-amz-error-code: NotFound response.
  • Verifies the client returns Error::NotFound with 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.

@overtrue overtrue merged commit 7c0803c into main May 5, 2026
19 checks passed
@overtrue overtrue deleted the codex/test-list-versions-notfound-fallback branch May 5, 2026 05:25
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.

2 participants