MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / SetupTest

Method SetupTest

storage/s3/reader_test.go:37–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35}
36
37func (s *ReaderTestSuite) SetupTest() {
38 // Recreate S3 blob for each test using backend directly
39 backend := s.s3Storage().Server().Backend()
40 metadata := map[string]string{
41 "Content-Type": "application/octet-stream",
42 "Last-Modified": time.Now().Format(http.TimeFormat),
43 }
44 _, err := backend.PutObject(s.TestContainer, s.TestObjectKey, metadata,
45 bytes.NewReader(s.TestData), int64(len(s.TestData)), nil)
46 s.Require().NoError(err)
47}
48
49func TestReader(t *testing.T) {
50 suite.Run(t, new(ReaderTestSuite))

Callers

nothing calls this directly

Calls 3

BackendMethod · 0.80
FormatMethod · 0.65
ServerMethod · 0.45

Tested by

no test coverage detected