diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2014-12-01 11:36:52 +0200 |
---|---|---|
committer | Tzafrir Cohen <tzafrir@debian.org> | 2015-03-26 14:21:52 +0200 |
commit | 320db0d24a3884c704b7d0d7c1356b5d704dcfb6 (patch) | |
tree | a046924e30ee20e4124f491b9949ed75b02f3438 /tests/component/rpm/test_pq_rpm.py | |
parent | e4e3cb905c99d2b021c8fb6028e9ef92cd8d57ab (diff) |
pq: allow running actions in repo subdir
This should make the usage of gbp-pq more flexible and prevent mistakes
caused by e.g. running gbp-pq import under some subdirectory.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'tests/component/rpm/test_pq_rpm.py')
-rw-r--r-- | tests/component/rpm/test_pq_rpm.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/component/rpm/test_pq_rpm.py b/tests/component/rpm/test_pq_rpm.py index f0dac8d..16252f0 100644 --- a/tests/component/rpm/test_pq_rpm.py +++ b/tests/component/rpm/test_pq_rpm.py @@ -118,6 +118,18 @@ class TestPqRpm(RpmRepoTestBase): self._check_repo_state(repo, 'master-orphan', branches) eq_(repo.status()[' M'], ['packaging/gbp-test2.spec']) + def test_import_in_subdir(self): + """Test running gbp-rpm-pq from a subdir in the git tree""" + repo = self.init_test_repo('gbp-test2') + repo.set_branch('master-orphan') + branches = repo.get_local_branches() + ['patch-queue/master-orphan'] + os.chdir('packaging') + + # Running from subdir should be ok + eq_(mock_pq(['import']), 0) + self._check_repo_state(repo, 'patch-queue/master-orphan', branches) + + def test_rebase(self): """Basic test for rebase action""" repo = self.init_test_repo('gbp-test') |