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

Method TestDownloadStatusOK

imagedata/image_data_test.go:79–88  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

77}
78
79func (s *ImageDataTestSuite) TestDownloadStatusOK() {
80 imgdata, _, err := s.factory().DownloadSync(
81 context.Background(), s.testServer().URL(), "Test image", imagedata.DownloadOptions{},
82 )
83
84 s.Require().NoError(err)
85 s.Require().NotNil(imgdata)
86 s.Require().True(testutil.ReadersEqual(s.T(), bytes.NewReader(s.data), imgdata.Reader()))
87 s.Require().Equal(imagetype.JPEG, imgdata.Format())
88}
89
90func (s *ImageDataTestSuite) TestDownloadStatusPartialContent() {
91 testCases := []struct {

Callers

nothing calls this directly

Calls 7

ReadersEqualFunction · 0.92
DownloadSyncMethod · 0.80
BackgroundMethod · 0.80
TMethod · 0.80
ReaderMethod · 0.65
FormatMethod · 0.65
URLMethod · 0.45

Tested by

no test coverage detected