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

Feature request: separate internet tests #92

Closed
orlitzky opened this issue Dec 11, 2014 · 4 comments
Closed

Feature request: separate internet tests #92

orlitzky opened this issue Dec 11, 2014 · 4 comments

Comments

@orlitzky
Copy link
Contributor

Would you be willing to separate out the tests for http-client into internet and non-internet suites? Some of them should work fine if you e.g. unplug your network cable, like anything that hits localhost. Others make external requests and should be expected to fail when the net connection is down.

In Gentoo, we have the ability (eventually, the default) to run tests in a sandbox, and restrict each package's test suite to a separate network namespace. Within the sandbox, the local tests will still run fine, but the external ones die for obvious reasons. If the two suites were split, we could at least run the half that should work locally.

Reference: https://bugs.gentoo.org/show_bug.cgi?id=532216

@snoyberg
Copy link
Owner

I'll accept a pull request to do this, but it's difficult for me to guarantee that the test suite will always work in such an environment, since I have no easy way to test it myself (nor, frankly, the inclination to spend a lot of effort on using such an environment).

@orlitzky
Copy link
Contributor Author

How's this look?

https://github.com/orlitzky/http-client/commit/ecf409ec71fe1d25364d78073d4cffdf0cf9a1a3

I still need to figure out a way to emulate our sandbox to make sure it works (it does with my network disabled), and then I can send the pull request if it looks good to you.

@snoyberg
Copy link
Owner

Yes, that looks good to me.

@orlitzky
Copy link
Contributor Author

It's tested and working, thanks. PR sent.

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