diff options
author | Guido Günther <agx@sigxcpu.org> | 2017-10-18 09:18:42 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2017-10-18 09:18:42 +0200 |
commit | 8189b5a37d49629c1b509068da00aaad04e205f5 (patch) | |
tree | f8300ef99fbcecdc7fd61315462678ba395bfabe /tests/component | |
parent | e7ad0f2cb99e42d7282d561f2488f869754a8710 (diff) |
import-dsc: test importing multiple debian revisions works
so we don't regress on d0ee56bc0e6d53ee952d9c4e30dbe78e40e18383.
Gbp-Dch: Ignore
Diffstat (limited to 'tests/component')
m--------- | tests/component/deb/data | 0 | ||||
-rw-r--r-- | tests/component/deb/test_import_dsc.py | 31 |
2 files changed, 31 insertions, 0 deletions
diff --git a/tests/component/deb/data b/tests/component/deb/data -Subproject a70cc571c3ebe5d47b7bd4a8f6b41c157c930d9 +Subproject f3ba072d98886942fe3653f644106c8e523161e diff --git a/tests/component/deb/test_import_dsc.py b/tests/component/deb/test_import_dsc.py index 154272c7..1d824124 100644 --- a/tests/component/deb/test_import_dsc.py +++ b/tests/component/deb/test_import_dsc.py @@ -142,6 +142,37 @@ class TestImportDsc(ComponentTestBase): commits, expected = len(repo.get_commits()), 2 ok_(commits == expected, "Found %d commit instead of %d" % (commits, expected)) + def test_import_30_pristine_tar(self): + dscfile = self._dsc30('2.6-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 + commitmsg = repo.get_commit_info('HEAD')['body'] + eq_("hello-debhelper (2.6-1) unstable; urgency=low", commitmsg.split('\n')[0]) + ok_(commits == expected, "Found %d commit instead of %d" % (commits, expected)) + + os.chdir(repo.path) + dscfile = self._dsc30('2.6-2') + assert import_dsc(['arg0', + '--verbose', + '--pristine-tar', + '--debian-branch=master', + '--upstream-branch=upstream', + dscfile]) == 0 + commits, expected = len(repo.get_commits()), 3 + commitmsg = repo.get_commit_info('HEAD')['body'] + eq_("hello-debhelper (2.6-2) unstable; urgency=medium", commitmsg.split('\n')[0]) + ok_(commits == expected, "Found %d commit instead of %d" % (commits, expected)) + + commits, expected = len(repo.get_commits(until='pristine-tar')), 1 + ok_(commits == expected, "Found %d pristine-tar commits instead of %d" % (commits, expected)) + def test_import_30_additional_tarball_pristine_tar(self): """Test if importing a package with additional tarballs works""" def _dsc(version): |