Skip to content

test(s3): cover select access denied fallback#153

Merged
overtrue merged 1 commit intomainfrom
codex/test-s3-select-access-denied
Apr 23, 2026
Merged

test(s3): cover select access denied fallback#153
overtrue merged 1 commit intomainfrom
codex/test-s3-select-access-denied

Conversation

@overtrue
Copy link
Copy Markdown
Contributor

Related Issue(s)

None. This is focused test-gap coverage from recent S3 Select work.

Background

Recent S3 Select support added error classification for backend failures. The mapper already handled explicit AccessDenied metadata, but the fallback path used when SDK metadata is missing did not preserve the auth classification.

Root Cause

classify_aws_code_missing_metadata only searched fallback error text for NotImplemented, NoSuchKey, and NoSuchBucket. AccessDenied text therefore fell through to a general error.

Solution

Add a focused fallback branch that maps AccessDenied text to rc_core::Error::Auth, plus a unit test covering the missing-metadata path.

Tests

  • cargo test -p rc-s3 select::tests::classify_missing_code_maps_access_denied_substring --lib
  • make pre-commit

@overtrue overtrue marked this pull request as ready for review April 23, 2026 05:13
@overtrue overtrue merged commit 512890f into main Apr 23, 2026
15 checks passed
@overtrue overtrue deleted the codex/test-s3-select-access-denied branch April 23, 2026 13:35
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