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

Make all tests offline #593

Open
2 of 5 tasks
jacobtomlinson opened this issue Jul 29, 2018 · 7 comments
Open
2 of 5 tasks

Make all tests offline #593

jacobtomlinson opened this issue Jul 29, 2018 · 7 comments

Comments

@jacobtomlinson
Copy link
Member

jacobtomlinson commented Jul 29, 2018

We have some tests which are checking things like pulling from GitHub, downloading files, installing deps from pypi, etc. This means the tests can break if there is no internet connection.

I've also noticed this happen from Travis where a GitHub url is denied, this may be some kind of rate limiting if lots of people on Travis are hitting GitHub.

We should mock out our tests better so they don't actually connect to the internet. This should also speed them up.


Update
Added list of failing tests so we can tick them off as they are fixed.

  • tests/test_loader.py::TestLoader::test_install_default_remote_module
  • tests/test_loader.py::TestLoader::test_install_gist_module_file
  • tests/test_loader.py::TestLoader::test_install_gist_module_notebook
  • tests/test_loader.py::TestLoader::test_install_specific_local_git_module
  • tests/test_loader.py::TestLoader::test_install_specific_local_path_module
@FabioRosado
Copy link
Member

I was thinking about the tests yesterday. Some of the tests I have done rely on sleep() which makes them slower as well. Perhaps we could make the sleep quite short (perhaps 0.1sec) so it will still get called but the delay won't be too bad, what do you think?

@athanikos
Copy link
Contributor

can I take this up ?

@FabioRosado
Copy link
Member

Yeah this issue is still open it would be great if you could work on it. Please let me know if you need any help

@Cadair
Copy link
Contributor

Cadair commented Dec 2, 2019

Having just spent a good number of hours on a plane hacking on opsdroid, I can attest to this not being solved 😀

@Cadair Cadair reopened this Dec 2, 2019
@Cadair
Copy link
Contributor

Cadair commented Dec 2, 2019

It seems there are at least 3 config tests which still try to git pull. We could consider adding a tox job which uses https://github.com/miketheman/pytest-socket to prevent future regressions on this.

@jacobtomlinson
Copy link
Member Author

Sounds good.

@athanikos
Copy link
Contributor

Hello, I would like to work on this if its available, thanks

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

No branches or pull requests

4 participants