chiark / gitweb /
test suite: clone-skew: Test for accessing mirror via http
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 6 Sep 2019 20:00:11 +0000 (21:00 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 6 Sep 2019 21:05:17 +0000 (22:05 +0100)
This test is misnamed right now, but really we are going to make it do
something interesting.

Right now it just sets everything up to access the mirror via http
rather than file://.

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

index 731600b7494e0ee7a999509089244240e84baa3f..f8e112acc79a30a5a4495bad97c889e82ab16a1b 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: alternating-dgit clone-gitnosuite clone-nogit drs-clone-nogit dsd-clone-nogit ftpmasterapi-http
+Tests: alternating-dgit clone-gitnosuite clone-nogit clone-skew 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/clone-skew b/tests/tests/clone-skew
new file mode 100755 (executable)
index 0000000..cedcf1f
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/bash
+set -e
+. tests/lib
+
+t-dependencies libhttp-server-simple-static-perl
+
+$troot/http-static-server >$tmp/must-clean/mirror.port $tmp/mirror
+read <$tmp/must-clean/mirror.port mirror_port
+
+t-git-config --global dgit-distro.test-dummy.mirror \
+       http://127.0.0.1:$mirror_port/
+
+t_archive_ln_s=cp
+
+t-archive example 1.0-1
+t-git-none
+
+t-dgit clone $p
+
+cd $p
+t-cloned-fetched-good
+
+t-ok