From: Ian Jackson Date: Tue, 26 Jun 2018 20:55:37 +0000 (+0100) Subject: test suite: Test ill-advised repeat dgit push after git push fails X-Git-Tag: archive/debian/5.3~5 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=94518af3396d2ff724f98e5bb6b6a533e14c78e8 test suite: Test ill-advised repeat dgit push after git push fails This demonstrates #869146, which is about dgit repeatedly adding the same .orig to the .changes. Signed-off-by: Ian Jackson --- diff --git a/debian/tests/control b/debian/tests/control index 378cf4cc..8b9d34ef 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -52,7 +52,7 @@ Tests-Directory: tests/tests Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin Restrictions: x-dgit-git-only -Tests: absurd-gitapply badcommit-rewrite build-modes build-modes-asplit build-modes-gbp-asplit clone-clogsigpipe clone-gitnosuite clone-nogit debpolicy-dbretry debpolicy-newreject debpolicy-quilt-gbp defdistro-rpush defdistro-setup distropatches-reject dpkgsourceignores-correct drs-clone-nogit drs-push-masterupdate drs-push-rejects dsd-clone-nogit dsd-divert fetch-localgitonly fetch-somegit-notlast gbp-orig gitconfig gitworktree import-dsc import-maintmangle import-native import-nonnative import-tarbomb inarchivecopy mismatches-contents mismatches-dscchanges multisuite newtag-clone-nogit oldnewtagalt oldtag-clone-nogit orig-include-exclude orig-include-exclude-chkquery overwrite-chkclog overwrite-junk overwrite-splitbrains overwrite-version protocol-compat push-buildproductsdir push-newpackage push-nextdgit push-source push-source-with-changes quilt quilt-gbp quilt-gbp-build-modes quilt-singlepatch quilt-splitbrains quilt-useremail rpush tag-updates test-list-uptodate trustingpolicy-replay unrepresentable version-opt +Tests: absurd-gitapply badcommit-rewrite build-modes build-modes-asplit build-modes-gbp-asplit clone-clogsigpipe clone-gitnosuite clone-nogit debpolicy-dbretry debpolicy-newreject debpolicy-quilt-gbp defdistro-rpush defdistro-setup distropatches-reject dpkgsourceignores-correct drs-clone-nogit drs-push-masterupdate drs-push-rejects dsd-clone-nogit dsd-divert fetch-localgitonly fetch-somegit-notlast gbp-orig gitconfig gitworktree import-dsc import-maintmangle import-native import-nonnative import-tarbomb inarchivecopy mismatches-contents mismatches-dscchanges multisuite newtag-clone-nogit oldnewtagalt oldtag-clone-nogit orig-include-exclude orig-include-exclude-chkquery overwrite-chkclog overwrite-junk overwrite-splitbrains overwrite-version protocol-compat push-buildproductsdir push-newpackage push-newrepeat push-nextdgit push-source push-source-with-changes quilt quilt-gbp quilt-gbp-build-modes quilt-singlepatch quilt-splitbrains quilt-useremail rpush tag-updates test-list-uptodate trustingpolicy-replay unrepresentable version-opt Tests-Directory: tests/tests Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin diff --git a/tests/tests/push-newrepeat b/tests/tests/push-newrepeat new file mode 100755 index 00000000..87fcb356 --- /dev/null +++ b/tests/tests/push-newrepeat @@ -0,0 +1,21 @@ +#!/bin/bash +set -e +. tests/lib + +t-tstunt-parsechangelog + +t-prep-newpackage example 1.0 + +cd $p +git checkout quilt-tip +cp $troot/pkg-srcs/${p}_1.0.orig.tar.gz .. + +t-dgit --quilt=smash build-source + +t-expect-fail E:'Push failed, while updating the remote git repository' \ +t-dgit -cdgit-distro.test-dummy.git-url=file:///dev/enoent/fail \ + push --new + +t-dgit push --new + +t-ok