From c3c1ba424e0fb36e923f62ea4098e818ea64323f Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 21 Jan 2017 11:39:16 +0000 Subject: [PATCH] test suite: defdistro-dsd-clone-drs: New test Would have detected #851906 (and hopefully #850521). Signed-off-by: Ian Jackson --- debian/changelog | 6 +++++- debian/tests/control | 2 +- tests/tests/defdistro-dsd-clone-drs | 14 ++++++++++++++ tests/tests/dsd-clone-drs | 1 + 4 files changed, 21 insertions(+), 2 deletions(-) create mode 100755 tests/tests/defdistro-dsd-clone-drs diff --git a/debian/changelog b/debian/changelog index 1bada744..a8760fa0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,7 +4,11 @@ dgit (3.7~) unstable; urgency=medium * Fix clone-dgit-repos-server and print-dgit-repos-server-print-url. Closes:#851906. - -- + Test suite: + * defdistro-dsd-clone-drs: New test which would have detected + #851906 (and hopefully #850521). + + -- Ian Jackson Sat, 21 Jan 2017 11:38:57 +0000 dgit (3.6) unstable; urgency=medium diff --git a/debian/tests/control b/debian/tests/control index 1528fe08..87118356 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -6,7 +6,7 @@ Tests: clone-reprepro downstream-gitless Tests-Directory: tests/tests Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, reprepro -Tests: dsd-clone-drs +Tests: defdistro-dsd-clone-drs dsd-clone-drs Tests-Directory: tests/tests Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential Restrictions: x-dgit-intree-only x-dgit-git-only diff --git a/tests/tests/defdistro-dsd-clone-drs b/tests/tests/defdistro-dsd-clone-drs new file mode 100755 index 00000000..1a1c138c --- /dev/null +++ b/tests/tests/defdistro-dsd-clone-drs @@ -0,0 +1,14 @@ +#!/bin/bash +. tests/lib + +t-restrict x-dgit-intree-only +t-restrict x-dgit-git-only + +export DGIT_TEST_DSD_CLONE_DRS_HOOK=' + t-git-config dgit.default.distro test-dummy + url=$(git config dgit-distro.test-dummy.git-url) + t-git-config dgit-distro.test-dummy/push.git-url "$url" + t-git-config dgit-distro.test-dummy.git-url nosuchprotocol:// +' + +t-alt-test diff --git a/tests/tests/dsd-clone-drs b/tests/tests/dsd-clone-drs index 4346579a..6065c5f4 100755 --- a/tests/tests/dsd-clone-drs +++ b/tests/tests/dsd-clone-drs @@ -6,6 +6,7 @@ t-restrict x-dgit-intree-only t-restrict x-dgit-git-only t-dsd +eval "$DGIT_TEST_DSD_CLONE_DRS_HOOK" cd $tmp t-dgit clone-dgit-repos-server drs-cloned -- 2.30.2