Skip to content

Commit

Permalink
fix writer empty test
Browse files Browse the repository at this point in the history
  • Loading branch information
pollosp committed Jan 20, 2025
1 parent 21417c8 commit d2d7168
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions exporter/awss3exporter/internal/upload/writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,24 +121,14 @@ func TestS3ManagerUpload(t *testing.T) {
name: "STANDARD_IA storage class",
handler: func(t *testing.T) http.Handler {
return http.HandlerFunc(func(_ http.ResponseWriter, r *http.Request) {
// ...
// Example of validating that the S3 storage class header is set correctly
assert.Equal(t, "STANDARD_IA", r.Header.Get("x-amz-storage-class"))
})
},
storageClass: "STANDARD_IA",
data: []byte("some data"),
errVal: "",
},
{
name: "ONEZONE_IA storage class",
handler: func(t *testing.T) http.Handler {
return http.HandlerFunc(func(_ http.ResponseWriter, r *http.Request) {
// ...
})
},
storageClass: "ONEZONE_IA",
data: []byte("some data"),
errVal: "",
},
} {
t.Run(tc.name, func(t *testing.T) {
t.Parallel()
Expand All @@ -163,7 +153,7 @@ func TestS3ManagerUpload(t *testing.T) {
BaseEndpoint: aws.String(s.URL),
Region: "local",
}),
"STANDARD", // <-- Pass your desired storage class here
"STANDARD_IA", // <-- Pass your desired storage class here
)

// Using a mocked virtual clock to fix the timestamp used
Expand Down

0 comments on commit d2d7168

Please sign in to comment.