You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are running tests for our packages with blocked Internet access. The following tests in pygit2 fail:
======================================================================
ERROR: test_user_pass (test.test_credentials.CallableCredentialTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/portage/dev-python/pygit2-0.26.1/work/pygit2-0.26.1/test/test_credentials.py", line 108, in test_user_pass
remote.fetch(callbacks=callbacks)
File "/tmp/portage/dev-python/pygit2-0.26.1/work/pygit2-0.26.1-python2_7/lib/pygit2/remote.py", line 375, in fetch
check_error(err)
File "/tmp/portage/dev-python/pygit2-0.26.1/work/pygit2-0.26.1-python2_7/lib/pygit2/errors.py", line 64, in check_error
raise GitError(message)
GitError: curl error: Could not resolve: bitbucket.org (Could not contact DNS servers)
======================================================================
ERROR: test_bad_cred_type (test.test_credentials.CredentialCallback)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/portage/dev-python/pygit2-0.26.1/work/pygit2-0.26.1/test/test_credentials.py", line 98, in test_bad_cred_type
self.assertRaises(TypeError, lambda: remote.fetch(callbacks=MyCallbacks()))
File "/usr/lib64/python2.7/unittest/case.py", line 473, in assertRaises
callableObj(*args, **kwargs)
File "/tmp/portage/dev-python/pygit2-0.26.1/work/pygit2-0.26.1/test/test_credentials.py", line 98, in <lambda>
self.assertRaises(TypeError, lambda: remote.fetch(callbacks=MyCallbacks()))
File "/tmp/portage/dev-python/pygit2-0.26.1/work/pygit2-0.26.1-python2_7/lib/pygit2/remote.py", line 375, in fetch
check_error(err)
File "/tmp/portage/dev-python/pygit2-0.26.1/work/pygit2-0.26.1-python2_7/lib/pygit2/errors.py", line 64, in check_error
raise GitError(message)
GitError: curl error: Could not resolve: github.com (Could not contact DNS servers)
======================================================================
ERROR: test_clone_with_credentials (test.test_repository.CloneRepositoryTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/portage/dev-python/pygit2-0.26.1/work/pygit2-0.26.1/test/test_repository.py", line 579, in test_clone_with_credentials
self._temp_dir, callbacks=pygit2.RemoteCallbacks(credentials=pygit2.UserPass("libgit2", "libgit2")))
File "/tmp/portage/dev-python/pygit2-0.26.1/work/pygit2-0.26.1-python2_7/lib/pygit2/__init__.py", line 258, in clone_repository
check_error(err)
File "/tmp/portage/dev-python/pygit2-0.26.1/work/pygit2-0.26.1-python2_7/lib/pygit2/errors.py", line 64, in check_error
raise GitError(message)
GitError: curl error: Could not resolve: bitbucket.org (Could not contact DNS servers)
======================================================================
ERROR: test_init_and_update (test.test_submodule.SubmoduleTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/portage/dev-python/pygit2-0.26.1/work/pygit2-0.26.1/test/test_submodule.py", line 80, in test_init_and_update
self.repo.update_submodules()
GitError: curl error: Could not resolve: github.com (Could not contact DNS servers)
======================================================================
ERROR: test_oneshot_update (test.test_submodule.SubmoduleTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/portage/dev-python/pygit2-0.26.1/work/pygit2-0.26.1/test/test_submodule.py", line 93, in test_oneshot_update
self.repo.update_submodules(init=True)
GitError: curl error: Could not resolve: github.com (Could not contact DNS servers)
======================================================================
ERROR: test_specified_update (test.test_submodule.SubmoduleTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/portage/dev-python/pygit2-0.26.1/work/pygit2-0.26.1/test/test_submodule.py", line 87, in test_specified_update
self.repo.update_submodules(submodules=['submodule'])
GitError: curl error: Could not resolve: github.com (Could not contact DNS servers)
======================================================================
ERROR: test_submodule_open (test.test_submodule.SubmoduleTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/portage/dev-python/pygit2-0.26.1/work/pygit2-0.26.1/test/test_submodule.py", line 59, in test_submodule_open
self.repo.update_submodules()
GitError: curl error: Could not resolve: github.com (Could not contact DNS servers)
----------------------------------------------------------------------
Ran 316 tests in 20.687s
FAILED (errors=7)
Running tests against remote servers is generally a bad idea. Besides them being unreliable (failing randomly due to service outages or network problems), the user may be running a byte-counted data plan in which the tests unnecessarily increase his expenditures and cause privacy issues. We have those reasons enumerated in Gentoo developer manual.
Please make it easily possible to disable the tests requiring network access, or possibly replace them with variants that work locally.
The text was updated successfully, but these errors were encountered:
Fixed, now the tests will be automatically skipped if there's no network.
Me too I would prefer versions of tests that don't require network, but that's much more work, will have to wait.
Thanks for reporting.
We are running tests for our packages with blocked Internet access. The following tests in pygit2 fail:
Running tests against remote servers is generally a bad idea. Besides them being unreliable (failing randomly due to service outages or network problems), the user may be running a byte-counted data plan in which the tests unnecessarily increase his expenditures and cause privacy issues. We have those reasons enumerated in Gentoo developer manual.
Please make it easily possible to disable the tests requiring network access, or possibly replace them with variants that work locally.
The text was updated successfully, but these errors were encountered: