Implement proxy-download mode in the mock AWS driver - #428
Open
bauerpawel wants to merge 1 commit into
Open
bauerpawel wants to merge 1 commit into
bauerpawel wants to merge 1 commit into
Conversation
The mock driver's ServeFile always redirected to a presigned URL, regardless of the ProxyDownload config option, so the real driver's proxy-download path had no test coverage. Mirrors the real implementation: streams the file content from a local test fixture at "data/<sha1>" (the same convention used by Stream()) instead of redirecting. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0168YUwGEzEHTqd9CwzXE53d
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.
Description
The real S3 driver supports a
ProxyDownloadconfig option (stream the file content through the server instead of redirecting to a presigned URL), but the mock driver used forawsmock-tagged tests always redirected regardless of that setting — so the proxy-download code path had no test coverage at all.Mirrors the real implementation in the mock: when
ProxyDownloadis set, reads the file content from a local test fixture atdata/<sha1>(the same conventionStream()already uses) and streams it to the response instead of redirecting.Type of Change
Technical Details
How Has This Been Tested?
Aws_mock_test.gocovering proxy-download streaming (happy path), a missing on-disk fixture (error path), and confirming the existing redirect behavior still works whenProxyDownloadis off. All pass in isolation and as part of the full suite.Checklist
ProxyDownloaditself already existed and is documented)🤖 Generated with Claude Code
https://claude.ai/code/session_0168YUwGEzEHTqd9CwzXE53d