chiark / gitweb /
http[s] tests: Add http test case
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 25 Jul 2019 02:52:53 +0000 (03:52 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 10 Aug 2019 23:09:27 +0000 (00:09 +0100)
Maybe we will turn this into a TLS test case in due course.

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

index 63e936979c98da359229388037b4e25adfc9e9c4..850b35db41c169f9e65be036e95b33b80cbe025c 100644 (file)
@@ -20,6 +20,10 @@ 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: 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
+
 Tests: gdr-merge-conflicts
 Tests-Directory: tests/tests
 Depends: chiark-utils-bin, faketime, git-debrebase, git-buildpackage, quilt
diff --git a/tests/tests/ftpmasterapi-http b/tests/tests/ftpmasterapi-http
new file mode 100755 (executable)
index 0000000..82d3c86
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/bash
+set -e
+. tests/lib
+
+t-archive-none example
+
+t-dependencies libhttp-server-simple-static-perl
+
+$troot/ftpmasterapi-static-server >$tmp/must-clean/api.port $tmp/aq
+
+read <$tmp/must-clean/api.port api_port
+
+t-git-config --global dgit-distro.test-dummy.archive-query ftpmasterapi:
+t-git-config --global dgit-distro.test-dummy.archive-query-url \
+   http://127.0.0.1:$api_port/
+
+t-dgit archive-api-query suites
+
+t-ok