diff --git a/README.md b/README.md index 066f2b6..1f7be99 100644 --- a/README.md +++ b/README.md @@ -115,8 +115,8 @@ Execute $ make regress to start the suite. Keep in mind that the regression tests needs to -create a few file inside the `regress` directory and bind the 10965 -port. +create a few file inside the `regress` directory and bind the 10965 and +10966 ports. ## Contributing 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 # 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 # 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 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