TestContainerNotFound verifies that requesting from a non-existent container returns 404
()
| 163 | |
| 164 | // TestContainerNotFound verifies that requesting from a non-existent container returns 404 |
| 165 | func (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 | |
| 178 | func (s *ReaderSuite) testConditionalHeaders(reqValue, resValue string, status int) { |
| 179 | ctx := s.T().Context() |