Skip to content
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

Failing httpbin-tests #58

Closed
qrilka opened this issue Feb 18, 2019 · 3 comments
Closed

Failing httpbin-tests #58

qrilka opened this issue Feb 18, 2019 · 3 comments

Comments

@qrilka
Copy link

qrilka commented Feb 18, 2019

Probably something has changed on httpbin.org - it looks like it doesn't send Connection: close header anymore so the tests using it start to fail:

Failures:

  httpbin-tests/Network/HTTP/ReqSpec.hs:67:7: 
  1) Network.HTTP.Req, receiving request headers back, works
       expected: Object (fromList [("headers",Object (fromList [("Accept-Encoding",String "gzip"),("Connection",String "close"),("Foo",String "bar"),("Baz",String "quux"),("Host",String "httpbin.org")]))])
        but got: Object (fromList [("headers",Object (fromList [("Accept-Encoding",String "gzip"),("Foo",String "bar"),("Baz",String "quux"),("Host",String "httpbin.org")]))])

  To rerun use: --match "/Network.HTTP.Req/receiving request headers back/works/"

  httpbin-tests/Network/HTTP/ReqSpec.hs:80:7: 
  2) Network.HTTP.Req, receiving GET data back, works
       expected: Object (fromList [("args",Object (fromList [])),("url",String "https://httpbin.org/get"),("headers",Object (fromList [("Accept-Encoding",String "gzip"),("Connection",String "close"),("Host",String "httpbin.org")]))])
        but got: Object (fromList [("args",Object (fromList [])),("url",String "https://httpbin.org/get"),("headers",Object (fromList [("Accept-Encoding",String "gzip"),("Host",String "httpbin.org")]))])

  To rerun use: --match "/Network.HTTP.Req/receiving GET data back/works/"

  httpbin-tests/Network/HTTP/ReqSpec.hs:96:7: 
  3) Network.HTTP.Req, receiving POST JSON data back, works
       expected: Object (fromList [("args",Object (fromList [])),("json",String "foo"),("data",String "\"foo\""),("url",String "https://httpbin.org/post"),("headers",Object (fromList [("Content-Type",String "application/json; charset=utf-8"),("Accept-Encoding",String "gzip"),("Connection",String "close"),("Host",String "httpbin.org"),("Content-Length",String "5")])),("files",Object (fromList [])),("form",Object (fromList []))])
        but got: Object (fromList [("args",Object (fromList [])),("json",String "foo"),("data",String "\"foo\""),("url",String "https://httpbin.org/post"),("headers",Object (fromList [("Content-Type",String "application/json; charset=utf-8"),("Accept-Encoding",String "gzip"),("Host",String "httpbin.org"),("Content-Length",String "5")])),("files",Object (fromList [])),("form",Object (fromList []))])

  To rerun use: --match "/Network.HTTP.Req/receiving POST JSON data back/works/"

  httpbin-tests/Network/HTTP/ReqSpec.hs:120:7: 
  4) Network.HTTP.Req, receiving POST data back (multipart form data), works
       expected: Object (fromList [("args",Object (fromList [])),("json",Null),("data",String ""),("url",String "https://httpbin.org/post"),("headers",Object (fromList [("Content-Type",String "multipart/form-data; boundary=----WebKitFormBoundaryqF5ZRQWq6uj4q2w0"),("Accept-Encoding",String "gzip"),("Connection",String "close"),("Host",String "httpbin.org"),("Content-Length",String "242")])),("files",Object (fromList [])),("form",Object (fromList [("foo",String "foo data!"),("bar",String "bar data!")]))])
        but got: Object (fromList [("args",Object (fromList [])),("json",Null),("data",String ""),("url",String "https://httpbin.org/post"),("headers",Object (fromList [("Content-Type",String "multipart/form-data; boundary=----WebKitFormBoundaryqF5ZRQWq6uj4q2w0"),("Accept-Encoding",String "gzip"),("Host",String "httpbin.org"),("Content-Length",String "242")])),("files",Object (fromList [])),("form",Object (fromList [("foo",String "foo data!"),("bar",String "bar data!")]))])

  To rerun use: --match "/Network.HTTP.Req/receiving POST data back (multipart form data)/works/"

  httpbin-tests/Network/HTTP/ReqSpec.hs:147:7: 
  5) Network.HTTP.Req, receiving PATCHed file back, works
       expected: Object (fromList [("args",Object (fromList [])),("json",Null),("data",String "User-agent: *\nDisallow: /deny\n"),("url",String "https://httpbin.org/patch"),("headers",Object (fromList [("Accept-Encoding",String "gzip"),("Connection",String "close"),("Host",String "httpbin.org"),("Content-Length",String "30")])),("files",Object (fromList [])),("form",Object (fromList []))])
        but got: Object (fromList [("args",Object (fromList [])),("json",Null),("data",String "User-agent: *\nDisallow: /deny\n"),("url",String "https://httpbin.org/patch"),("headers",Object (fromList [("Accept-Encoding",String "gzip"),("Host",String "httpbin.org"),("Content-Length",String "30")])),("files",Object (fromList [])),("form",Object (fromList []))])

  To rerun use: --match "/Network.HTTP.Req/receiving PATCHed file back/works/"

  httpbin-tests/Network/HTTP/ReqSpec.hs:169:7: 
  6) Network.HTTP.Req, receiving PUT form URL-encoded data back, works
       expected: Object (fromList [("args",Object (fromList [])),("json",Null),("data",String ""),("url",String "https://httpbin.org/put"),("headers",Object (fromList [("Content-Type",String "application/x-www-form-urlencoded"),("Accept-Encoding",String "gzip"),("Connection",String "close"),("Host",String "httpbin.org"),("Content-Length",String "18")])),("files",Object (fromList [])),("form",Object (fromList [("foo",String "bar"),("baz",String "5"),("quux",String "")]))])
        but got: Object (fromList [("args",Object (fromList [])),("json",Null),("data",String ""),("url",String "https://httpbin.org/put"),("headers",Object (fromList [("Content-Type",String "application/x-www-form-urlencoded"),("Accept-Encoding",String "gzip"),("Host",String "httpbin.org"),("Content-Length",String "18")])),("files",Object (fromList [])),("form",Object (fromList [("foo",String "bar"),("baz",String "5"),("quux",String "")]))])

  To rerun use: --match "/Network.HTTP.Req/receiving PUT form URL-encoded data back/works/"

Randomized with seed 1847904547
@mrkkrp
Copy link
Owner

mrkkrp commented Feb 18, 2019

This is fixed now in master. Do you want me to do a release?

@qrilka
Copy link
Author

qrilka commented Feb 19, 2019

That could make sense if you don't want to have req in expected-test-failures on Stackage and there's no upcoming release in the near future.

@mrkkrp
Copy link
Owner

mrkkrp commented Feb 19, 2019

Published version 2.0.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants