aboutsummaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2024-08-03 10:16:13 +0000
committerOmar Polo <op@omarpolo.com>2024-08-03 10:16:13 +0000
commit9360fb1a552b13b24f0b21bfd7146460e87341e0 (patch)
tree86ce0a48b9d35d93f031c8c45cb20d863ba716a4 /regress
parent19dc21be61edc4757bb53de4b56cb747d0b6cd2b (diff)
regress: run the proxies on a different port
Soon we may want to run (some) proxies with the proxy-protocol so we can't reuse the same port.
Diffstat (limited to 'regress')
-rw-r--r--regress/lib.sh7
-rw-r--r--regress/tests.sh4
2 files changed, 6 insertions, 5 deletions
diff --git a/regress/lib.sh b/regress/lib.sh
index f9d5d3d..6116cd7 100644
--- a/regress/lib.sh
+++ b/regress/lib.sh
@@ -13,6 +13,7 @@ run_test() {
ggflags=
host="$REGRESS_HOST"
port=10965
+ proxy_port=10966
config_common="log syslog off"
hdr=
body=
@@ -86,7 +87,7 @@ set_proxy() {
server "localhost.local" {
cert "$PWD/localhost.pem"
key "$PWD/localhost.key"
- listen on $host port $port
+ listen on $host port $proxy_port
proxy {
relay-to localhost port $port
$1
@@ -117,13 +118,13 @@ setup_simple_test() {
# usage: get <path>
# return the body of the request on stdout
get() {
- $gg -q -T10 $ggflags "gemini://$gghost:10965/$1" || true
+ $gg -q -T10 $ggflags "gemini://$gghost:$port/$1" || true
}
# usage: head <path>
# return the meta response line on stdout
head() {
- $gg -q -T10 -d header $ggflags "gemini://$gghost:10965/$1" || true
+ $gg -q -T10 -d header $ggflags "gemini://$gghost:$port/$1" || true
}
# usage: fetch <path>
diff --git a/regress/tests.sh b/regress/tests.sh
index 8eafabb..4905dbc 100644
--- a/regress/tests.sh
+++ b/regress/tests.sh
@@ -402,14 +402,14 @@ test_proxy_relay_to() {
run
- ggflags="-P localhost:$port -H localhost.local"
+ ggflags="-P localhost:$proxy_port -H localhost.local"
fetch /
check_reply "20 text/gemini" "# hello world"
}
test_proxy_with_certs() {
- ggflags="-P localhost:$port -H localhost.local"
+ ggflags="-P localhost:$proxy_port -H localhost.local"
# first test using the valid keys