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

Docker tests run even when not connected to network #20

Open
jayvdb opened this issue Jul 12, 2019 · 0 comments
Open

Docker tests run even when not connected to network #20

jayvdb opened this issue Jul 12, 2019 · 0 comments

Comments

@jayvdb
Copy link

jayvdb commented Jul 12, 2019

I am building an RPM for this package, and have a few tests failing with the following

[   66s] ======================================================================
[   66s] ERROR: setUpClass (webdavfs.tests.test_docker.TestExistDB30)
[   66s] ----------------------------------------------------------------------
[   66s] Traceback (most recent call last):
[   66s]   File "/home/abuild/rpmbuild/BUILD/fs.webdavfs-0.3.7/webdavfs/tests/test_docker.py", line 41, in setUpClass
[   66s]     cls.docker_client = docker.from_env(version='auto')
[   66s]   File "/usr/lib/python2.7/site-packages/docker/client.py", line 85, in from_env
[   66s]     timeout=timeout, version=version, **kwargs_from_env(**kwargs)
[   66s]   File "/usr/lib/python2.7/site-packages/docker/client.py", line 40, in __init__
[   66s]     self.api = APIClient(*args, **kwargs)
[   66s]   File "/usr/lib/python2.7/site-packages/docker/api/client.py", line 190, in __init__
[   66s]     self._version = self._retrieve_server_version()
[   66s]   File "/usr/lib/python2.7/site-packages/docker/api/client.py", line 215, in _retrieve_server_version
[   66s]     'Error while fetching server API version: {0}'.format(e)
[   66s] DockerException: Error while fetching server API version: ('Connection aborted.', error(2, 'No such file or directory'))

c.f. https://build.opensuse.org/package/show/home:jayvdb:pyfs/python-fs.webdavfs

The tests mostly are skipped due to not having an envvar set, and I doubt I will try to mock it by setting up a fake webdav service inside the build box, so I will probably disable the tests anyway as only two tests are running. However it would be nice if those classes also skipped if they cant reach the internet.

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

1 participant