chiark / gitweb /
test suite: http-git-check: New provision
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 8 Aug 2019 10:41:37 +0000 (11:41 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 10 Aug 2019 23:09:28 +0000 (00:09 +0100)
Importing this makes us use a local http server for the git check.
It's a setup so that it can imply the http-git-check dependency.

Right now nothing imports this so no functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
tests/setup/http-git-check [new file with mode: 0755]

diff --git a/tests/setup/http-git-check b/tests/setup/http-git-check
new file mode 100755 (executable)
index 0000000..0e3b7c2
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/bash
+set -e
+. tests/lib
+
+t-dependencies libhttp-server-simple-static-perl
+
+t-setup-done '' --files-from=/dev/null '
+ $troot/http-static-server >$tmp/must-clean/git-check.port $tmp/git
+ read <$tmp/must-clean/git-check.port git_check_port
+
+ t-git-config --global dgit-distro.test-dummy.git-check        url
+ t-git-config --global dgit-distro.test-dummy.git-check-suffix .git/HEAD
+ t-git-config --global dgit-distro.test-dummy.git-check-url    \
+          http://127.0.0.1:$git_check_port
+'