webdavfs
webdavfs copied to clipboard
Docker tests run even when not connected to network
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.