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

req test suite failures #14

Closed
DanBurton opened this issue Mar 18, 2017 · 4 comments
Closed

req test suite failures #14

DanBurton opened this issue Mar 18, 2017 · 4 comments

Comments

@DanBurton
Copy link

As seen on the stackage build server:

req-0.2.0
dist/build/httpbin-tests/httpbin-tests
...

Failures:

  httpbin-tests/Network/HTTP/ReqSpec.hs:104:
  1) Network.HTTP.Req, receiving request headers back, works
       expected: Object (fromList [("headers",Object (fromList [("Accept-Encoding",String
"gzip"),("Foo",String "bar"),("Baz",String "quux"),("Host",String "httpbin.org")]))])
        but got: Object (fromList [("headers",Object (fromList [("X-Request-Id",String "ea
264881-cd8e-4b1a-b876-186a47bceb9c"),("Connect-Time",String "0"),("Accept-Encoding",String
 "gzip"),("Connection",String "close"),("Foo",String "bar"),("Baz",String "quux"),("Host",
String "httpbin.org"),("Total-Route-Time",String "0"),("Via",String "1.1 vegur")]))])

  httpbin-tests/Network/HTTP/ReqSpec.hs:116:
  2) Network.HTTP.Req, receiving GET data back, works
       expected: Object (fromList [("args",Object (fromList [])),("url",String "https://ht
tpbin.org/get"),("headers",Object (fromList [("Accept-Encoding",String "gzip"),("Host",Str
ing "httpbin.org")]))])
        but got: Object (fromList [("args",Object (fromList [])),("url",String "https://ht
tpbin.org/get"),("headers",Object (fromList [("X-Request-Id",String "b745faaa-9340-40c8-93
35-cde7b6f81522"),("Connect-Time",String "0"),("Accept-Encoding",String "gzip"),("Connecti
on",String "close"),("Host",String "httpbin.org"),("Total-Route-Time",String "0"),("Via",S
tring "1.1 vegur")]))])

  httpbin-tests/Network/HTTP/ReqSpec.hs:131:
  3) Network.HTTP.Req, receiving POST JSON data back, works
       expected: Object (fromList [("args",Object (fromList [])),("json",String "foo"),("d
ata",String "\"foo\""),("url",String "https://httpbin.org/post"),("headers",Object (fromLi
st [("Content-Type",String "application/json; charset=utf-8"),("Accept-Encoding",String "g
zip"),("Host",String "httpbin.org"),("Content-Length",String "5")])),("files",Object (from
List [])),("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"),("X-Request-Id",String "a2dd54c7-974b-4fe9-9d2a-a2118585c6aa"),("Connect-Time",String "0"),("Accept-Encoding",String "gzip"),("Connection",String "close"),("Host",String "httpbin.org"),("Content-Length",String "5"),("Total-Route-Time",String "0"),("Via",String "1.1 vegur")])),("files",Object (fromList [])),("form",Object (fromList []))])

  httpbin-tests/Network/HTTP/ReqSpec.hs:154:
  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=----WebKitFormBoundaryJIJzCBnSJaoTXT4L"),("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!")]))])
        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=----WebKitFormBoundaryJIJzCBnSJaoTXT4L"),("X-Request-Id",String "d4ee58e9-ebc5-4e0f-ad61-0c884431e555"),("Connect-Time",String "0"),("Accept-Encoding",String "gzip"),("Connection",String "close"),("Host",String "httpbin.org"),("Content-Length",String "242"),("Total-Route-Time",String "0"),("Via",String "1.1 vegur")])),("files",Object (fromList [])),("form",Object (fromList [("foo",String "foo data!"),("bar",String "bar data!")]))])

  httpbin-tests/Network/HTTP/ReqSpec.hs:180:
  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"),("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 [("X-Request-Id",String "81ddef2a-ff74-4076-b386-ab93f01e3adf"),("Connect-Time",String "0"),("Accept-Encoding",String "gzip"),("Connection",String "close"),("Host",String "httpbin.org"),("Content-Length",String "30"),("Total-Route-Time",String "0"),("Via",String "1.1 vegur")])),("files",Object (fromList [])),("form",Object (fromList []))])

  httpbin-tests/Network/HTTP/ReqSpec.hs:201:
  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"),("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"),("X-Request-Id",String "ca6878af-3f04-4b49-a2f9-2ed36f412bc3"),("Connect-Time",String "0"),("Accept-Encoding",String "gzip"),("Connection",String "close"),("Host",String "httpbin.org"),("Content-Length",String "18"),("Total-Route-Time",String "0"),("Via",String "1.1 vegur")])),("files",Object (fromList [])),("form",Object (fromList [("foo",String "bar"),("baz",String "5"),("quux",String "")]))])

Randomized with seed 678382428

Finished in 2.1131 seconds
72 examples, 6 failures

@DanBurton
Copy link
Author

DanBurton commented Mar 18, 2017

I was able to reproduce these failures on my local machine like so:

$ stack unpack req-0.2.0 && cd req-0.2.0
$ stack init --resolver nightly-2017-03-17
$ stack test

@mrkkrp
Copy link
Owner

mrkkrp commented Mar 18, 2017

This happens because httpbin service has chaged collection of headers it returns. It's not a deficiency of req. I have fixed this in the master. Can we ignore the failure or is a release with fixed test suite desirable?

@DanBurton
Copy link
Author

I'll just mark the test suite as an expected failure for now.

DanBurton added a commit to commercialhaskell/stackage that referenced this issue Mar 18, 2017
@DanBurton
Copy link
Author

Release with fixed test suite at your leisure. It's desirable but not at all urgent.

wldhx added a commit to wldhx/nixpkgs that referenced this issue Sep 30, 2017
wldhx added a commit to wldhx/nixpkgs that referenced this issue Sep 30, 2017
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