Skip to content
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

feat(storage): Implement io.WriterTo in Reader #9659

Merged
merged 5 commits into from
Mar 28, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Prev Previous commit
Next Next commit
fix conf test object vars
  • Loading branch information
tritone committed Mar 28, 2024
commit 61d27ff31cdb2c7f64c6a0ec89b6ff1136ba6a95
6 changes: 3 additions & 3 deletions storage/retry_conformance_test.go
Expand Up @@ -280,7 +280,7 @@ var methods = map[string][]retryFunc{
// Test download via Reader.WriteTo.
// Before running the test method, populate a large test object of 9 MiB.
objName := objectIDs.New()
if err := uploadTestObject(fs.bucket.Name, objName, randomBytes9MB); err != nil {
if err := uploadTestObject(fs.bucket.Name, objName, randomBytes3MiB); err != nil {
return fmt.Errorf("failed to create 9 MiB large object pre test, err: %v", err)
}
// Download the large test object for the S8 download method group.
Expand All @@ -294,10 +294,10 @@ var methods = map[string][]retryFunc{
if err != nil {
return fmt.Errorf("failed to ReadAll, err: %v", err)
}
if got, want := data.Len(), size9MB; got != want {
if got, want := data.Len(), 3*MiB; got != want {
return fmt.Errorf("body length mismatch\ngot:\n%v\n\nwant:\n%v", got, want)
}
if got, want := data.Bytes(), randomBytes9MB; !bytes.Equal(got, want) {
if got, want := data.Bytes(), randomBytes3MiB; !bytes.Equal(got, want) {
return fmt.Errorf("body mismatch\ngot:\n%v\n\nwant:\n%v", got, want)
}
return nil
Expand Down