chiark / gitweb /
Test suite: overwrite-splitbrains: New test
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 18 Oct 2016 00:35:59 +0000 (01:35 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 18 Oct 2016 00:44:39 +0000 (01:44 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/tests/control
tests/tests/overwrite-splitbrains [new file with mode: 0755]

index 2b3bc24..6ef6271 100644 (file)
@@ -21,7 +21,7 @@ Tests-Directory: tests/tests
 Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8)
 Restrictions: x-dgit-git-only
 
-Tests: build-modes build-modes-asplit build-modes-gbp-asplit clone-clogsigpipe clone-gitnosuite clone-nogit debpolicy-dbretry debpolicy-newreject debpolicy-quilt-gbp distropatches-reject drs-clone-nogit drs-push-masterupdate drs-push-rejects dsd-clone-nogit dsd-divert fetch-localgitonly fetch-somegit-notlast gitconfig import-native import-nonnative inarchivecopy mismatches-contents mismatches-dscchanges newtag-clone-nogit oldnewtagalt oldtag-clone-nogit overwrite-chkclog overwrite-junk overwrite-version push-buildproductsdir push-newpackage push-nextdgit quilt quilt-gbp quilt-gbp-build-modes quilt-singlepatch quilt-splitbrains rpush tag-updates test-list-uptodate trustingpolicy-replay unrepresentable version-opt
+Tests: build-modes build-modes-asplit build-modes-gbp-asplit clone-clogsigpipe clone-gitnosuite clone-nogit debpolicy-dbretry debpolicy-newreject debpolicy-quilt-gbp distropatches-reject drs-clone-nogit drs-push-masterupdate drs-push-rejects dsd-clone-nogit dsd-divert fetch-localgitonly fetch-somegit-notlast gitconfig import-native import-nonnative inarchivecopy mismatches-contents mismatches-dscchanges newtag-clone-nogit oldnewtagalt oldtag-clone-nogit overwrite-chkclog overwrite-junk overwrite-splitbrains overwrite-version push-buildproductsdir push-newpackage push-nextdgit quilt quilt-gbp quilt-gbp-build-modes quilt-singlepatch quilt-splitbrains rpush tag-updates test-list-uptodate trustingpolicy-replay unrepresentable version-opt
 Tests-Directory: tests/tests
 Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8)
 
diff --git a/tests/tests/overwrite-splitbrains b/tests/tests/overwrite-splitbrains
new file mode 100755 (executable)
index 0000000..c0c7470
--- /dev/null
@@ -0,0 +1,27 @@
+#!/bin/bash
+set -e
+. tests/lib
+
+t-tstunt-parsechangelog
+
+t-gbp-example-prep-no-ff
+t-newtag
+
+t-dgit --quilt=gbp build-source
+
+t-dgit fetch
+
+t-refs-same-start
+t-ref-head
+
+t-expect-fail 'check failed (maybe --overwrite is needed' \
+t-dgit --quilt=gbp push
+
+t-refs-same-start
+t-ref-head
+
+t-dgit --quilt=gbp --overwrite push
+
+t-gbp-pushed-good
+
+echo ok.