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

Method TestObjectNotFound

storage/testsuite/reader.go:155–162  ·  view source on GitHub ↗

TestObjectNotFound verifies that requesting a non-existent object returns 404

()

Source from the content-addressed store, hash-verified

153
154// TestObjectNotFound verifies that requesting a non-existent object returns 404
155func (s *ReaderSuite) TestObjectNotFound() {
156 ctx := s.T().Context()
157 reqHeader := make(http.Header)
158
159 response, err := s.Storage().GetObject(ctx, reqHeader, s.TestContainer, "nonexistent/object.png", "")
160 s.Require().NoError(err)
161 s.Require().Equal(http.StatusNotFound, response.Status)
162}
163
164// TestContainerNotFound verifies that requesting from a non-existent container returns 404
165func (s *ReaderSuite) TestContainerNotFound() {

Callers

nothing calls this directly

Calls 2

TMethod · 0.80
GetObjectMethod · 0.65

Tested by

no test coverage detected