From 1f15cc0b9d98dae42abdb74ea2864f39bb06c833 Mon Sep 17 00:00:00 2001 From: Isaiah Vita Date: Thu, 28 Dec 2023 15:30:24 -0800 Subject: [PATCH] add expected signed retry header in unit tests --- service/s3/internal/customizations/presign_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/service/s3/internal/customizations/presign_test.go b/service/s3/internal/customizations/presign_test.go index fb689cba3ba..fee63bd31ed 100644 --- a/service/s3/internal/customizations/presign_test.go +++ b/service/s3/internal/customizations/presign_test.go @@ -41,6 +41,7 @@ func TestPutObject_PresignURL(t *testing.T) { }, expectMethod: "PUT", expectSignedHeader: http.Header{ + "Amz-Sdk-Request": []string{"attempt=1; max=1"}, "Content-Length": []string{"11"}, "Content-Type": []string{"application/octet-stream"}, "Host": []string{"mock-bucket.s3.us-west-2.amazonaws.com"}, @@ -62,6 +63,7 @@ func TestPutObject_PresignURL(t *testing.T) { }, expectMethod: "PUT", expectSignedHeader: http.Header{ + "Amz-Sdk-Request": []string{"attempt=1; max=1"}, "Content-Length": []string{"11"}, "Content-Type": []string{"application/octet-stream"}, "Host": []string{"mock-bucket.s3.us-west-2.amazonaws.com"}, @@ -84,6 +86,7 @@ func TestPutObject_PresignURL(t *testing.T) { }, expectMethod: "PUT", expectSignedHeader: http.Header{ + "Amz-Sdk-Request": []string{"attempt=1; max=1"}, "Content-Length": []string{"11"}, "Content-Type": []string{"application/octet-stream"}, "Host": []string{"mock-bucket.s3.us-west-2.amazonaws.com"}, @@ -105,6 +108,7 @@ func TestPutObject_PresignURL(t *testing.T) { }, expectMethod: "PUT", expectSignedHeader: http.Header{ + "Amz-Sdk-Request": []string{"attempt=1; max=1"}, "Host": []string{"mock-bucket.s3.us-west-2.amazonaws.com"}, }, }, @@ -123,6 +127,7 @@ func TestPutObject_PresignURL(t *testing.T) { }, expectMethod: "PUT", expectSignedHeader: http.Header{ + "Amz-Sdk-Request": []string{"attempt=1; max=1"}, "Host": []string{"mock-bucket.s3.us-west-2.amazonaws.com"}, }, }, @@ -142,6 +147,7 @@ func TestPutObject_PresignURL(t *testing.T) { }, expectMethod: "PUT", expectSignedHeader: http.Header{ + "Amz-Sdk-Request": []string{"attempt=1; max=1"}, "Host": []string{"mock-bucket.s3.us-west-2.amazonaws.com"}, "Content-Length": []string{"100"}, }, @@ -163,6 +169,7 @@ func TestPutObject_PresignURL(t *testing.T) { }, expectMethod: "PUT", expectSignedHeader: http.Header{ + "Amz-Sdk-Request": []string{"attempt=1; max=1"}, "Content-Length": []string{"11"}, "Content-Type": []string{"application/octet-stream"}, "Host": []string{"mfzwi23gnjvgw.mrap.accesspoint.s3-global.amazonaws.com"}, @@ -204,6 +211,7 @@ func TestPutObject_PresignURL(t *testing.T) { }, expectMethod: "PUT", expectSignedHeader: http.Header{ + "Amz-Sdk-Request": []string{"attempt=1; max=1"}, "Content-Length": []string{"11"}, "Content-Type": []string{"application/octet-stream"}, "Host": []string{"mock-bucket.s3.us-west-2.amazonaws.com"}, @@ -228,6 +236,7 @@ func TestPutObject_PresignURL(t *testing.T) { }, expectMethod: "PUT", expectSignedHeader: http.Header{ + "Amz-Sdk-Request": []string{"attempt=1; max=1"}, "Host": []string{"mock-bucket.s3.us-west-2.amazonaws.com"}, }, }, @@ -315,6 +324,7 @@ func TestUploadPart_PresignURL(t *testing.T) { }, expectMethod: "PUT", expectSignedHeader: http.Header{ + "Amz-Sdk-Request": []string{"attempt=1; max=1"}, "Content-Length": []string{"11"}, "Content-Type": []string{"application/octet-stream"}, "Host": []string{"mock-bucket.s3.us-west-2.amazonaws.com"}, @@ -340,6 +350,7 @@ func TestUploadPart_PresignURL(t *testing.T) { }, expectMethod: "PUT", expectSignedHeader: http.Header{ + "Amz-Sdk-Request": []string{"attempt=1; max=1"}, "Content-Length": []string{"11"}, "Content-Type": []string{"application/octet-stream"}, "Host": []string{"mock-bucket.s3.us-west-2.amazonaws.com"}, @@ -366,6 +377,7 @@ func TestUploadPart_PresignURL(t *testing.T) { }, expectMethod: "PUT", expectSignedHeader: http.Header{ + "Amz-Sdk-Request": []string{"attempt=1; max=1"}, "Content-Length": []string{"11"}, "Content-Type": []string{"application/octet-stream"}, "Host": []string{"mock-bucket.s3.us-west-2.amazonaws.com"}, @@ -391,6 +403,7 @@ func TestUploadPart_PresignURL(t *testing.T) { }, expectMethod: "PUT", expectSignedHeader: http.Header{ + "Amz-Sdk-Request": []string{"attempt=1; max=1"}, "Host": []string{"mock-bucket.s3.us-west-2.amazonaws.com"}, }, }, @@ -413,6 +426,7 @@ func TestUploadPart_PresignURL(t *testing.T) { }, expectMethod: "PUT", expectSignedHeader: http.Header{ + "Amz-Sdk-Request": []string{"attempt=1; max=1"}, "Host": []string{"mock-bucket.s3.us-west-2.amazonaws.com"}, }, },