summaryrefslogtreecommitdiffstats
path: root/debian/tests
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 19:37:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 19:37:09 +0000
commit2d0d5aeaf12b3d258db900523710db7c9db73018 (patch)
tree2faf74016289936f4c843074be9299764e39e930 /debian/tests
parentAdding upstream version 1.59.0. (diff)
downloadnghttp2-2d0d5aeaf12b3d258db900523710db7c9db73018.tar.xz
nghttp2-2d0d5aeaf12b3d258db900523710db7c9db73018.zip
Adding debian version 1.59.0-1.debian/1.59.0-1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/tests')
-rw-r--r--debian/tests/control3
-rwxr-xr-xdebian/tests/proxy-works17
2 files changed, 20 insertions, 0 deletions
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..d16eec9
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: proxy-works
+Depends: nginx, @
+Restrictions: isolation-container
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