aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2016-12-04 19:35:28 +0100
committerGuido Günther <agx@sigxcpu.org>2016-12-04 19:51:42 +0100
commita10c77b515de0b92740a38f7d4fbe58b1b4cc9f6 (patch)
tree1d65de72c919f1ffd4b28a6dcf73177696542666 /tests
parentf631e64845e1d6584b94dd18da2b5e91d4c71d67 (diff)
import_srpm: allow for more than one argument
otherwise giving a target dir always raises an error (introduced by 03276df5b9391dc877521cd6c3553ca071157991)
Diffstat (limited to 'tests')
-rw-r--r--tests/component/rpm/test_import_srpm.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/component/rpm/test_import_srpm.py b/tests/component/rpm/test_import_srpm.py
index bc942588..6e714c35 100644
--- a/tests/component/rpm/test_import_srpm.py
+++ b/tests/component/rpm/test_import_srpm.py
@@ -76,6 +76,15 @@ class TestImportPacked(ComponentTestBase):
# Two commits: upstream and packaging files
eq_(len(repo.get_commits()), 2)
+ def test_target_dir(self):
+ """Test importing to target dir"""
+ srpm = os.path.join(DATA_DIR, 'gbp-test-1.0-1.src.rpm')
+ eq_(mock_import(['--no-pristine-tar', srpm, 'targetdir']), 0)
+ # Check repository state
+ assert os.path.exists('targetdir')
+ repo = GitRepository('targetdir')
+ self._check_repo_state(repo, 'master', ['master', 'upstream'])
+
def test_basic_import_orphan(self):
"""
Test importing of non-native src.rpm to separate packaging and