mirror of https://github.com/omar-polo/gmid.git
add a test for the `proxy relay-to' rule
This commit is contained in:
parent
c143dcfa85
commit
4b5b1e82a9
|
@ -51,5 +51,6 @@ run_test test_root_inside_location_with_redirect
|
|||
run_test test_fastcgi
|
||||
run_test test_macro_expansion
|
||||
run_test test_174_bugfix
|
||||
run_test test_proxy_relay_to
|
||||
|
||||
tests_done
|
||||
|
|
|
@ -313,3 +313,21 @@ test_174_bugfix() {
|
|||
check_reply "51 not found" || return 1
|
||||
done
|
||||
}
|
||||
|
||||
test_proxy_relay_to() {
|
||||
gen_config '' ''
|
||||
# append config for second host
|
||||
cat <<EOF >> reg.conf
|
||||
server "localhost.local" {
|
||||
cert "$PWD/cert.pem"
|
||||
key "$PWD/key.pem"
|
||||
proxy relay-to "localhost:$port"
|
||||
}
|
||||
EOF
|
||||
run
|
||||
|
||||
gg_flags="-P localhost:$port -H localhost.local"
|
||||
|
||||
fetch /
|
||||
check_reply "20 text/gemini" "# hello world"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue