Skip to content

Commit

Permalink
svc to s3
Browse files Browse the repository at this point in the history
  • Loading branch information
ItamarYuran committed Dec 26, 2024
1 parent 0b2e2b4 commit 8b4d12f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions esti/multipart_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func TestMultipartUpload(t *testing.T) {
partsConcat = append(partsConcat, parts[i]...)
}

completedParts := uploadMultipartParts(t, ctx, logger, resp, parts, 0)
completedParts := uploadMultipartParts(t, ctx, svc, logger, resp, parts, 0)

if isBlockstoreType(block.BlockstoreTypeS3) == nil {
// Object should have Last-Modified time at around time of MPU creation. Ensure
Expand Down Expand Up @@ -166,7 +166,7 @@ func reverse(s string) string {
return string(runes)
}

func uploadMultipartParts(t *testing.T, ctx context.Context, logger logging.Logger, resp *s3.CreateMultipartUploadOutput, parts [][]byte, firstIndex int) []types.CompletedPart {
func uploadMultipartParts(t *testing.T, ctx context.Context, client *s3.Client, logger logging.Logger, resp *s3.CreateMultipartUploadOutput, parts [][]byte, firstIndex int) []types.CompletedPart {
count := len(parts)
completedParts := make([]types.CompletedPart, count)
errs := make([]error, count)
Expand All @@ -176,7 +176,7 @@ func uploadMultipartParts(t *testing.T, ctx context.Context, logger logging.Logg
go func(i int) {
defer wg.Done()
partNumber := firstIndex + i + 1
completedParts[i], errs[i] = uploadMultipartPart(ctx, logger, svc, resp, parts[i], partNumber)
completedParts[i], errs[i] = uploadMultipartPart(ctx, logger, client, resp, parts[i], partNumber)
}(i)
}
wg.Wait()
Expand Down
2 changes: 1 addition & 1 deletion esti/s3_gateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ func TestMultipartUploadIfNoneMatch(t *testing.T) {

parts := make([][]byte, multipartNumberOfParts)

completedParts := uploadMultipartParts(t, ctx, logger, resp, parts, 0)
completedParts := uploadMultipartParts(t, ctx, s3Client, logger, resp, parts, 0)

if isBlockstoreType(block.BlockstoreTypeS3) == nil {
// Object should have Last-Modified time at around time of MPU creation. Ensure
Expand Down

0 comments on commit 8b4d12f

Please sign in to comment.