aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2018-11-24 17:17:10 +0100
committerGuido Günther <agx@sigxcpu.org>2018-11-24 17:17:10 +0100
commitdacca59e1a968f79253dca901e212e868954fcff (patch)
tree6f7fa2a659f47dcb86d5079519d2187b0cddd12d /tests
parenta55d19f20a301b727874649b2519f9596bc3e084 (diff)
pristine-tar: support checking in/out upstream signatures
Diffstat (limited to 'tests')
-rw-r--r--tests/doctests/test_PristineTar.py39
1 files changed, 38 insertions, 1 deletions
diff --git a/tests/doctests/test_PristineTar.py b/tests/doctests/test_PristineTar.py
index 3616319b..825ef042 100644
--- a/tests/doctests/test_PristineTar.py
+++ b/tests/doctests/test_PristineTar.py
@@ -76,7 +76,7 @@ def test_commit_dir():
def test_create_tarball():
"""
- Create a tarball from a git tree
+ Create a tarball from a git tree and add a stub signature
Methods tested:
- L{gbp.deb.git.DebianGitRepository.archive}
@@ -85,6 +85,8 @@ def test_create_tarball():
>>> repo = gbp.deb.git.DebianGitRepository(dirs['repo'])
>>> repo.archive('tar', 'upstream/', '../upstream_1.0.orig.tar', 'upstream')
>>> gbp.command_wrappers.Command('gzip', [ '-n', '%s/../upstream_1.0.orig.tar' % dirs['repo']])()
+ >>> with open('%s/../upstream_1.0.orig.tar.gz.asc' % dirs['repo'], 'w') as f: f.write("sig")
+ 3
"""
@@ -101,6 +103,20 @@ def test_pristine_tar_commit():
"""
+def test_pristine_tar_commit_with_sig():
+ """
+ Commit the delta to the pristine-tar branch including a signature
+
+ Methods tested:
+ - L{gbp.deb.pristinetar.DebianPristineTar.commit}
+
+ >>> import gbp.deb.git
+ >>> repo = gbp.deb.git.DebianGitRepository(dirs['repo'])
+ >>> repo.pristine_tar.commit('../upstream_1.0.orig.tar.gz', 'upstream',
+ ... signaturefile='../upstream_1.0.orig.tar.gz.asc')
+ """
+
+
def test_pristine_has_commit():
"""
Find delta on the pristine tar branch
@@ -137,6 +153,27 @@ def test_pristine_tar_checkout():
"""
+def test_pristine_tar_checkout_with_sig():
+ """
+ Checkout a tarball using pristine-tar
+
+ Methods tested:
+ - L{gbp.deb.pristinetar.DebianPristineTar.checkout}
+
+ >>> import gbp.deb.git
+ >>> from gbp.deb.policy import DebianPkgPolicy
+
+ >>> repo = gbp.deb.git.DebianGitRepository(dirs['repo'])
+ >>> sf = os.path.join(repo.path,
+ ... DebianPkgPolicy.build_signature_name('upstream', '1.0', 'gzip', '..'))
+ >>> os.unlink(sf)
+ >>> repo.pristine_tar.checkout('upstream', '1.0', 'gzip', '..',
+ ... signature=True)
+ >>> os.path.exists(sf)
+ True
+ """
+
+
def test_pristine_tar_verify():
"""
Verify a tarball using pristine-tar