Skip to content

Commit

Permalink
add expected signed retry header in unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
isaiahvita committed Dec 28, 2023
1 parent 2382d13 commit 1f15cc0
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions service/s3/internal/customizations/presign_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand All @@ -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"},
Expand All @@ -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"},
Expand All @@ -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"},
},
},
Expand All @@ -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"},
},
},
Expand All @@ -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"},
},
Expand All @@ -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"},
Expand Down Expand Up @@ -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"},
Expand All @@ -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"},
},
},
Expand Down Expand Up @@ -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"},
Expand All @@ -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"},
Expand All @@ -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"},
Expand All @@ -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"},
},
},
Expand All @@ -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"},
},
},
Expand Down

0 comments on commit 1f15cc0

Please sign in to comment.