aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2018-08-19 08:29:27 +0200
committerGuido Günther <agx@sigxcpu.org>2018-08-19 08:29:27 +0200
commit3384a0f7a763144e5d627c454d7d76c2841e553b (patch)
tree0b0b5ed51bf2f16ee2a991894609bb75ccdb6522 /tests
parentddc4393a64f3662e0214ea180c7ec6f5a2ae3794 (diff)
Revert "gbp import-ref: New command to merge in changes from a upstream using git"
This reverts commit 1592882c38fcbb107332d9a0a63b8da4e0bf8a48. It's not ready yet.
Diffstat (limited to 'tests')
-rw-r--r--tests/01_test_help.py4
-rw-r--r--tests/component/deb/test_import_ref.py87
2 files changed, 2 insertions, 89 deletions
diff --git a/tests/01_test_help.py b/tests/01_test_help.py
index 25c36fb0..de930137 100644
--- a/tests/01_test_help.py
+++ b/tests/01_test_help.py
@@ -15,13 +15,13 @@ class TestHelp(TestCaseWithData):
'create_remote_repo',
'dch',
'import_orig',
- 'import_ref',
'import_dsc',
'pristine_tar',
'pull',
'push',
'pq',
- 'tag']
+ 'tag',
+ ]
rpm_cmds = ['buildpackage_rpm',
'import_srpm',
diff --git a/tests/component/deb/test_import_ref.py b/tests/component/deb/test_import_ref.py
deleted file mode 100644
index 260a8be1..00000000
--- a/tests/component/deb/test_import_ref.py
+++ /dev/null
@@ -1,87 +0,0 @@
-# vim: set fileencoding=utf-8 :
-#
-# (C) 2015,2017 Guido Günther <agx@sigxcpu.org>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, please see
-# <http://www.gnu.org/licenses/>
-
-import os
-
-from tests.component import ComponentTestBase
-from tests.component.deb import DEB_TEST_DATA_DIR
-from tests.component.deb.fixtures import RepoFixtures
-
-from gbp.scripts.import_ref import main as import_ref
-
-from nose.tools import ok_, eq_
-
-
-def _dsc_file(pkg, version, dir='dsc-3.0'):
- return os.path.join(DEB_TEST_DATA_DIR, dir, '%s_%s.dsc' % (pkg, version))
-
-
-DEFAULT_DSC = _dsc_file('hello-debhelper', '2.6-2')
-
-
-class TestImportRef(ComponentTestBase):
- """Test importing of new upstream versions"""
- pkg = "hello-debhelper"
- def_branches = ['master', 'upstream', 'pristine-tar']
-
- def _orig(self, version, dir='dsc-3.0'):
- return os.path.join(DEB_TEST_DATA_DIR,
- dir,
- '%s_%s.orig.tar.gz' % (self.pkg, version))
-
- @RepoFixtures.quilt30(DEFAULT_DSC, opts=['--pristine-tar'])
- def test_from_branch(self, repo):
- """
- Test that importing a upstream git from a branch works
- """
- eq_(len(repo.get_commits()), 2)
- ok_(import_ref(['arg0',
- '--upstream-tree=BRANCH',
- '--upstream-tag=theupstream/%(version)s',
- '-uaversion']) == 0)
- self._check_repo_state(repo, 'master', self.def_branches,
- tags=['debian/2.6-2', 'theupstream/aversion', 'upstream/2.6'])
- eq_(len(repo.get_commits()), 3)
-
- @RepoFixtures.quilt30(DEFAULT_DSC, opts=['--pristine-tar'])
- def test_from_version(self, repo):
- """
- Test that importing a upstream git from a given version works
- """
- eq_(len(repo.get_commits()), 2)
- ok_(import_ref(['arg0',
- '--upstream-tree=VERSION',
- '--upstream-tag=upstream/%(version)s',
- '-u2.6']) == 0)
- self._check_repo_state(repo, 'master', self.def_branches,
- tags=['debian/2.6-2', 'upstream/2.6'])
- eq_(len(repo.get_commits()), 3)
-
- @RepoFixtures.quilt30(DEFAULT_DSC, opts=['--pristine-tar'])
- def test_from_committish(self, repo):
- """
- Test that importing a upstream git from another commit works
- """
- eq_(len(repo.get_commits()), 2)
- ok_(import_ref(['arg0',
- '--upstream-tree=upstream',
- '--upstream-tag=upstream/%(version)s',
- '-u2.6']) == 0)
- self._check_repo_state(repo, 'master', self.def_branches,
- tags=['debian/2.6-2', 'upstream/2.6'])
- eq_(len(repo.get_commits()), 3)