elixir-mint / mint

Functional HTTP client for Elixir with support for HTTP/1 and HTTP/2 🌱
Apache License 2.0
1.36k stars 106 forks source link

Failing integration tests with http2.golang.org #340

Closed the-mikedavis closed 2 years ago

the-mikedavis commented 2 years ago

It looks like the http2.golang.org server got shut down recently (see https://github.com/golang/go/issues/49301), causing those integration tests to fail.

The workaround is easy: mix test --exclude integration but it'd be nice to have those integration tests.

Local cowboy servers seem like a good option, but as y'all say in #268:

I like to talk to someone over the internet at some point to make sure Mint is not tested in a complete vacuum

Maybe it makes sense to switch to httpbin.org for integration tests? And/or add the golang h2demo docker container to the docker-compose? I know Finch uses Bypass for some tests (example) and it seems to work pretty well and is easy to write, but it's also a local server.

What do you think? I'd be willing to take a stab at this (ofc if y'all want to keep CI/testing concerns close to the vest I understand that).

ericmj commented 2 years ago

Refactoring to use httpbin or replacing with a docker container would both work for me.

What do you think @whatyouhide, do you prefer over-the-internet tests or tests to a docker container?

whatyouhide commented 2 years ago

If possible, I would suggest that we:

  1. Do most integration tests against a Docker container running httpbin
  2. Do just a few tests against the real httbin.org, tag them as :over_the_internet, and treat them as smoke tests

Sounds good @ericmj?

whatyouhide commented 2 years ago

@the-mikedavis wanna work on this, or want us to take care of it? 🙃

the-mikedavis commented 2 years ago

actually if y'all wouldn't mind taking care of this, that'd probably be best :)