chiark / gitweb /
test suite: defdistro-dsd-clone-drs: New test
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 21 Jan 2017 11:39:16 +0000 (11:39 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 21 Jan 2017 11:39:19 +0000 (11:39 +0000)
Would have detected #851906 (and hopefully #850521).

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/changelog
debian/tests/control
tests/tests/defdistro-dsd-clone-drs [new file with mode: 0755]
tests/tests/dsd-clone-drs

index 1bada74..a8760fa 100644 (file)
@@ -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 <ijackson@chiark.greenend.org.uk>  Sat, 21 Jan 2017 11:38:57 +0000
 
 dgit (3.6) unstable; urgency=medium
 
index 1528fe0..8711835 100644 (file)
@@ -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 (executable)
index 0000000..1a1c138
--- /dev/null
@@ -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
index 4346579..6065c5f 100755 (executable)
@@ -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