adjust syntax in fastcgi test; add another test for the old syntax

This commit is contained in:
Omar Polo 2023-07-23 18:45:43 +00:00
parent a1ba9650a9
commit fdd67729b4
2 changed files with 22 additions and 1 deletions

View File

@ -51,6 +51,7 @@ run_test test_require_client_ca
run_test test_root_inside_location
run_test test_root_inside_location_with_redirect
run_test test_fastcgi
run_test test_fastcgi_deprecated_syntax
run_test test_macro_expansion
run_test test_proxy_relay_to
run_test test_proxy_with_certs

View File

@ -218,7 +218,7 @@ test_fastcgi() {
./fcgi-test fcgi.sock &
fcgi_pid=$!
setup_simple_test 'prefork 1' 'fastcgi "'$PWD'/fcgi.sock"'
setup_simple_test 'prefork 1' 'fastcgi socket "'$PWD'/fcgi.sock"'
msg=$(printf "# hello from fastcgi!\nsome more content in the page...")
@ -238,6 +238,26 @@ test_fastcgi() {
return 0
}
test_fastcgi_deprecated_syntax() {
./fcgi-test fcgi.sock &
fcgi_pid=$!
# the old syntax will eventually go away, but check that the
# backward compatibility works.
setup_simple_test 'prefork 1' 'fastcgi "'$PWD'/fcgi.sock"'
msg=$(printf "# hello from fastcgi!\nsome more content in the page...")
fetch /
check_reply "20 text/gemini" "$msg"
if [ $? -ne 0 ]; then
kill $fcgi_pid
return 1
fi
kill $fcgi_pid
return 0
}
test_macro_expansion() {
cat <<EOF > reg.conf
pwd = "$PWD"