chiark / gitweb /
test suite: alternating-dgit: New test
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 8 Aug 2019 11:31:46 +0000 (12:31 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 10 Aug 2019 23:09:29 +0000 (00:09 +0100)
This tests alternating dgit and non-dgit uploads.  These were broken
by the bug #934126 (check_for_git always returns false), in the http
rework, and not detected by the test suite (!)

This test *does* break if check_for_git always returns false.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/tests/control
tests/tests/alternating-dgit [new file with mode: 0755]

index e348eb573d850f9728ed7eab2a2f0c6caa027a88..731600b7494e0ee7a999509089244240e84baa3f 100644 (file)
@@ -20,7 +20,7 @@ Tests-Directory: tests/tests
 Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, faketime
 Restrictions: x-dgit-intree-only x-dgit-git-only
 
-Tests: clone-gitnosuite clone-nogit drs-clone-nogit dsd-clone-nogit ftpmasterapi-http
+Tests: alternating-dgit clone-gitnosuite clone-nogit drs-clone-nogit dsd-clone-nogit ftpmasterapi-http
 Tests-Directory: tests/tests
 Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, faketime, libhttp-server-simple-static-perl
 
diff --git a/tests/tests/alternating-dgit b/tests/tests/alternating-dgit
new file mode 100755 (executable)
index 0000000..c2ada5c
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+set -e
+. tests/lib
+
+t-setup-import examplegit
+t-setup-import http-git-check
+
+cd $p
+
+git checkout -b nondgit
+t-commit 'non-dgit upload'
+t-non-dgit-upload
+
+cd ..
+
+t-dgit clone $p ./$p.2
+cd $p.2
+
+t-commit 'now a dgit upload again'
+
+t-dgit -wgf push-source
+t-refs-same-start
+t-pushed-good dgit/sid
+
+t-ok