diff options
author | Guido Günther <agx@sigxcpu.org> | 2016-12-26 20:18:22 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2016-12-26 20:18:22 +0100 |
commit | 8038a6fe8aff6128dce6ff5423a5df35fa109edd (patch) | |
tree | b62dffedb6febe19f1ef9fa1f94555a70091e3a2 /tests/component/deb | |
parent | 58271d630fef2b235f4b8971f96bbd166eccca59 (diff) |
import-dsc: Improve error message if there is no dsc file
instead of spewing the exception on the console.
Diffstat (limited to 'tests/component/deb')
-rw-r--r-- | tests/component/deb/test_import_dsc.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/component/deb/test_import_dsc.py b/tests/component/deb/test_import_dsc.py index 947c2baf..a0d790c9 100644 --- a/tests/component/deb/test_import_dsc.py +++ b/tests/component/deb/test_import_dsc.py @@ -71,6 +71,19 @@ class TestImportDsc(ComponentTestBase): self._check_repo_state(repo, 'master', ['master']) assert len(repo.get_commits()) == 1 + @skipUnless(os.getenv("GBP_NETWORK_TESTS"), "network tests disabled") + def test_broken_download(self): + def _not_a_dsc(version): + return os.path.join(DEB_TEST_DOWNLOAD_URL, + 'dsc-3.0', + 'hello-debhelper_%s.orig.tar.gz' % version) + + f = _not_a_dsc('2.6') + assert import_dsc(['arg0', + '--allow-unauthenticated', + f]) == 1 + self._check_log(-1, "gbp:error: Did not find a dsc file at") + def test_create_branches(self): """Test if creating missing branches works""" def _dsc(version): |