-
Notifications
You must be signed in to change notification settings - Fork 697
Feat S3 Transfer Manager v2 GetObject/DownloadObject #2996
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
fb0d69c
Feat s3 transfer manager v2 PutObject (#2733)
wty-Bryant c603746
move transfer manager v2 integration tests to within module (#2987)
lucix-aws 453f02e
draft apis for downloader
74543bc
commit changes for now
5a37f78
draft commit
1b2f596
draft commit
3452a15
draft commit
fd0c1a3
draft commit
25fa0ed
draft commit
2a64e88
draft code for downloader
eacaa9b
draft code of test
b3aef11
draft code for getobject test
wty-Bryant e958754
add draft downloader unit test
wty-Bryant 92867ab
update getobject test
wty-Bryant 1a71fbc
update getobject tests
wty-Bryant c74c5fc
update getobject test
wty-Bryant a159886
update getobject test
wty-Bryant 6d31bec
draft code
wty-Bryant 0a831d9
draft code
wty-Bryant 4b4c32d
draft code
wty-Bryant 6b4b191
fix chunk writer issue
wty-Bryant 193d5a5
add integ test for getobject
wty-Bryant 393a1e8
add default checksum behavior to putobject
wty-Bryant 0eebee6
add default checksum behavior to getobject
wty-Bryant 0bc6f12
remove unrelated go mod change
wty-Bryant 72ee5a6
add comment for exported func and type
wty-Bryant 3d1be5d
add comment for exported type
wty-Bryant 259bb70
change comment and remove extra error unwrap func
wty-Bryant 87e6871
incomplete draft code
wty-Bryant cfb1a3b
split downloader and getter
wty-Bryant faad5de
add concurrent reader
wty-Bryant 7d30a68
implement concurrent reader for getobject
wty-Bryant 9512024
add comment
wty-Bryant b84f716
add test client comment
wty-Bryant 24204c3
fix some testing error syntax
wty-Bryant bae8833
change some data race code
wty-Bryant b8c1530
defer close single download response body
wty-Bryant 684ca8e
change max call
wty-Bryant File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Large diffs are not rendered by default.
Oops, something went wrong.
52 changes: 52 additions & 0 deletions
52
feature/s3/transfermanager/api_op_DownloadObject_integ_test.go
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
//go:build integration | ||
// +build integration | ||
|
||
package transfermanager | ||
|
||
import ( | ||
"bytes" | ||
"github.com/aws/aws-sdk-go-v2/feature/s3/transfermanager/types" | ||
"strings" | ||
"testing" | ||
) | ||
|
||
func TestInteg_DownloadObject(t *testing.T) { | ||
cases := map[string]getObjectTestData{ | ||
"part get seekable body": {Body: strings.NewReader("hello world"), ExpectBody: []byte("hello world")}, | ||
"part get empty string body": {Body: strings.NewReader(""), ExpectBody: []byte("")}, | ||
"part get multipart body": {Body: bytes.NewReader(largeObjectBuf), ExpectBody: largeObjectBuf}, | ||
"range get seekable body": { | ||
Body: strings.NewReader("hello world"), | ||
ExpectBody: []byte("hello world"), | ||
OptFns: []func(*Options){ | ||
func(opt *Options) { | ||
opt.GetObjectType = types.GetObjectRanges | ||
}, | ||
}, | ||
}, | ||
"range get empty string body": { | ||
Body: strings.NewReader(""), | ||
ExpectError: "InvalidRange", | ||
OptFns: []func(*Options){ | ||
func(opt *Options) { | ||
opt.GetObjectType = types.GetObjectRanges | ||
}, | ||
}, | ||
}, | ||
"range get multipart body": { | ||
Body: bytes.NewReader(largeObjectBuf), | ||
ExpectBody: largeObjectBuf, | ||
OptFns: []func(*Options){ | ||
func(opt *Options) { | ||
opt.GetObjectType = types.GetObjectRanges | ||
}, | ||
}, | ||
}, | ||
} | ||
|
||
for name, c := range cases { | ||
t.Run(name, func(t *testing.T) { | ||
testDownloadObject(t, setupMetadata.Buckets.Source.Name, c) | ||
}) | ||
} | ||
} |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.