-
Notifications
You must be signed in to change notification settings - Fork 23.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
uri: Add redirect tests for none, safe, urllib2 and all #37068
Conversation
0296362
to
b3c20a0
Compare
0b13250
to
da14ec9
Compare
This is required to test against /anything, which is important to test whether redirected links do a GET or POST request (without making assumptions and avoiding HTTP 405 METHOD NOT ALLOWED issues) For more information, see ansible#37068
Checking in. Is there something in this PR we're waiting on? |
We are waiting on updated testing environment to support these tests. The PRs are referenced above. |
Now that we have an updated httpbin, the integration tests are failing, but surprisingly it's not any tests of this PR that are failing...
PS And it is not failing locally. Let's restart Shippable. |
The httptester sha update hasn't been merged yet: #37746 |
@sivel In any case we need to catch BadStatusLine better in order to debug this... Thanks for the heads up. |
Those failures are generally due to the simple http server we start during the tests having trouble, or terminating before the tests are complete. |
da14ec9
to
ccb5f60
Compare
@sivel I'd like to return a proper error to the user, how about: except BadStatusLine as e:
info.update(dict(msg="Connection failure: connection was closed before a valid response was received: %s" % to_native(e.line), status=-1)) |
ccb5f60
to
9b6b9b3
Compare
This is required if we want to ensure that ansible#36809 doesn't cause any important behavioral changes. This PR changes the uri module to support follow_redirects=urllib2 It also adds a better error message when the connection closes before any data was returned.
9b6b9b3
to
5fd253d
Compare
This is ready to be re-evaluated. |
Yes, first we need this one merged, so we have a baseline for the original behavior. |
rebuild_merge |
This is required if we want to ensure that ansible#36809 doesn't cause any important behavioral changes. This PR changes the uri module to support follow_redirects=urllib2 It also adds a better error message when the connection closes before any data was returned.
This is required if we want to ensure that ansible#36809 doesn't cause any important behavioral changes. This PR changes the uri module to support follow_redirects=urllib2 It also adds a better error message when the connection closes before any data was returned.
SUMMARY
This is required if we want to ensure that #36809 doesn't cause any important behavioral changes.
This PR includes:
This requires httpbin v0.6.0+ we are using v0.5.0.
Latest httpbin is v0.6.2.
See
#37076#37222ISSUE TYPE
COMPONENT NAME
uri
ANSIBLE VERSION
v2.5