From 8b4d12feb60a8c064489c1d26c3c734039662ee6 Mon Sep 17 00:00:00 2001 From: Itamar Yuran Date: Thu, 26 Dec 2024 18:01:22 +0100 Subject: [PATCH] svc to s3 --- esti/multipart_test.go | 6 +++--- esti/s3_gateway_test.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/esti/multipart_test.go b/esti/multipart_test.go index 62a375f5975..e96d5af06d2 100644 --- a/esti/multipart_test.go +++ b/esti/multipart_test.go @@ -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 @@ -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) @@ -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() diff --git a/esti/s3_gateway_test.go b/esti/s3_gateway_test.go index 177b3b3f155..79279fcdbe0 100644 --- a/esti/s3_gateway_test.go +++ b/esti/s3_gateway_test.go @@ -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