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

Method TestContainerNotFound

storage/testsuite/reader.go:165–176  ·  view source on GitHub ↗

TestContainerNotFound verifies that requesting from a non-existent container returns 404

()

Source from the content-addressed store, hash-verified

163
164// TestContainerNotFound verifies that requesting from a non-existent container returns 404
165func (s *ReaderSuite) TestContainerNotFound() {
166 if s.TestContainer == "" {
167 s.T().Skip("Test container is blank: skipping test")
168 }
169
170 ctx := s.T().Context()
171 reqHeader := make(http.Header)
172
173 response, err := s.Storage().GetObject(ctx, reqHeader, "nonexistent-container", s.TestObjectKey, "")
174 s.Require().NoError(err)
175 s.Require().Equal(http.StatusNotFound, response.Status)
176}
177
178func (s *ReaderSuite) testConditionalHeaders(reqValue, resValue string, status int) {
179 ctx := s.T().Context()

Callers

nothing calls this directly

Calls 2

TMethod · 0.80
GetObjectMethod · 0.65

Tested by

no test coverage detected