diff --git a/request_test.go b/request_test.go index d3ffed2..d883f41 100644 --- a/request_test.go +++ b/request_test.go @@ -767,20 +767,6 @@ func (suite *RequestSuite) TestShouldFailPostingWithNonSeekerAttachmentAndAttemp suite.Assert().Equal("request_test.failingReader", details.Value.(string)) } -func (suite *RequestSuite) TestShouldFailWithBadRedirectLocation() { - serverURL, _ := url.Parse(suite.Server.URL) - serverURL, _ = serverURL.Parse("/bad_redirect") - _, err := request.Send(&request.Options{ - URL: serverURL, - Logger: suite.Logger, - }, nil) - suite.Require().Error(err, "Should have failed sending request") - suite.Logger.Errorf("Expected Error", err) - var details *url.Error - suite.Require().True(errors.As(err, &details), "Error chain should contain an URL Error") - suite.Assert().Contains(details.Error(), "response missing Location header") -} - func (suite *RequestSuite) TestShouldFailReceivingWhenTimeoutAnd1Attempt() { serverURL, _ := url.Parse(suite.Server.URL) serverURL, _ = serverURL.Parse("/timeout") diff --git a/server_test.go b/server_test.go index 90c3399..d683b3d 100644 --- a/server_test.go +++ b/server_test.go @@ -295,10 +295,6 @@ func CreateTestServer(suite *RequestSuite) *httptest.Server { res.Header().Add("X-Cache", "Miss form cloudfront") res.WriteHeader(http.StatusSeeOther) log.Infof("Redirecting to /Bo%%C3%%AEte.png") - case "/bad_redirect": - res.Header().Add("Location", "") // This is on purpose to check if the client handles this error well - res.WriteHeader(http.StatusFound) - log.Infof("Redirecting to /") case "/results": if _, err := res.Write([]byte(`{"code": 1234}`)); err != nil { log.Errorf("Failed to Write response to %s %s, error: %s", req.Method, req.URL, err)