summaryrefslogtreecommitdiffstats
path: root/debian/tests/proxy-works
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 07:34:16 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 07:34:16 +0000
commit6552fe980a10f9117d6f3cf26d2b439dc9a2954d (patch)
tree9bd56b1184cdf466a10acfa541956a566f77b9e9 /debian/tests/proxy-works
parentAdding upstream version 1.52.0. (diff)
downloadnghttp2-6552fe980a10f9117d6f3cf26d2b439dc9a2954d.tar.xz
nghttp2-6552fe980a10f9117d6f3cf26d2b439dc9a2954d.zip
Adding debian version 1.52.0-1+deb12u1.debian/1.52.0-1+deb12u1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/tests/proxy-works')
-rwxr-xr-xdebian/tests/proxy-works17
1 files changed, 17 insertions, 0 deletions
diff --git a/debian/tests/proxy-works b/debian/tests/proxy-works
new file mode 100755
index 0000000..1e03100
--- /dev/null
+++ b/debian/tests/proxy-works
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+# Nghttpx should proxy the port 80 by default.
+
+exec 2>&1
+set -eux
+
+PROXY=http://localhost:3000
+
+# Verify that we can connect
+nghttp ${PROXY} > /dev/null
+
+# Extract HTTP error code
+STATUS=$(nghttp ${PROXY} -v | grep -Po '(?<=:status: )(\d+)')
+
+# Verify it's OK (200).
+echo ${STATUS} | grep 200