From 7e351b96068e3851f63fe3d7298e956c955eed66 Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Sun, 27 Oct 2019 11:16:26 +0100 Subject: test_import_dsc.py: Test signature import --- tests/component/deb/test_import_dsc.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/component/deb/test_import_dsc.py b/tests/component/deb/test_import_dsc.py index a3b0aea9..3cdd2834 100644 --- a/tests/component/deb/test_import_dsc.py +++ b/tests/component/deb/test_import_dsc.py @@ -367,3 +367,20 @@ class TestImportDsc(ComponentTestBase): ok_(os.path.exists("./configure.ac")) ok_(not os.path.exists("./debian/patches/series")) ok_(not os.path.exists("./debian/patches/AUTHORS")) + + def test_import_signature(self): + dscfile = self._dsc30('2.8-1') + assert import_dsc(['arg0', + '--verbose', + '--pristine-tar', + '--debian-branch=master', + '--upstream-branch=upstream', + dscfile]) == 0 + repo = ComponentTestGitRepository('hello-debhelper') + self._check_repo_state(repo, 'master', ['master', 'pristine-tar', 'upstream']) + commits, expected = len(repo.get_commits()), 2 + commits, expected = len(repo.get_commits(until='pristine-tar')), 1 + ok_(commits == expected, "Found %d pristine-tar commits instead of %d" % (commits, expected)) + eq_(repo.ls_tree('pristine-tar'), {b'hello-debhelper_2.8.orig.tar.gz.delta', + b'hello-debhelper_2.8.orig.tar.gz.id', + b'hello-debhelper_2.8.orig.tar.gz.asc'}) -- cgit v1.2.3