From 407a97d3fde83c07687df1ef2c24fbf57dc9cbe0 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 8 Aug 2019 12:31:46 +0100 Subject: [PATCH] test suite: alternating-dgit: New test 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 --- debian/tests/control | 2 +- tests/tests/alternating-dgit | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100755 tests/tests/alternating-dgit diff --git a/debian/tests/control b/debian/tests/control index e348eb57..731600b7 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -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 index 00000000..c2ada5c9 --- /dev/null +++ b/tests/tests/alternating-dgit @@ -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 -- 2.30.2