aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2022-05-27 16:54:22 +0200
committerGuido Günther <agx@sigxcpu.org>2022-05-28 11:28:47 +0200
commit05ea122f530c0654d8deb0f878badc8bd4cdf58a (patch)
tree1f52b6facf2c19e7dadcf6ddda545c6ba965f3b0 /tests
parent441bd274de73b97f7f393aeee0aed9b5b373a011 (diff)
tests: Add "gbp import-orig --uscan" test
Diffstat (limited to 'tests')
-rw-r--r--tests/component/deb/test_import_orig.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/component/deb/test_import_orig.py b/tests/component/deb/test_import_orig.py
index 1feed773..745024e4 100644
--- a/tests/component/deb/test_import_orig.py
+++ b/tests/component/deb/test_import_orig.py
@@ -576,3 +576,18 @@ class TestImportOrig(ComponentTestBase):
self.check_hook_vars('../postunpack', ["GBP_GIT_DIR",
"GBP_TMP_DIR",
"GBP_SOURCES_DIR"])
+
+ @RepoFixtures.quilt30(DEFAULT_DSC, opts=['--pristine-tar'])
+ @skipUnless(os.getenv("GBP_NETWORK_TESTS"), "network tests disabled")
+ def test_uscan(self, repo):
+ """Test that importing via uscan works"""
+ with open("debian/watch", 'w+', encoding='utf-8') as f:
+ f.write("""version=4
+https://git.sigxcpu.org/cgit/gbp/deb-testdata/plain/dsc-3.0/ \
+ @PACKAGE@_@ANY_VERSION@\\.orig\\.tar\\.gz
+""")
+ repo.add_files(["debian/watch"])
+ repo.commit_files("debian/watch", msg="Add watch file")
+ ok_(import_orig(['arg0', '--uscan', '--no-interactive', '--no-pristine-tar']) == 0)
+ self._check_repo_state(repo, 'master', self.def_branches,
+ tags=['debian/2.6-2', 'upstream/2.6', 'upstream/2.8'])