2021-01-22 17:48:04 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2021-10-04 11:04:33 +02:00
|
|
|
rm -f gmid.pid
|
2021-01-22 17:48:04 +01:00
|
|
|
|
2021-10-04 11:04:33 +02:00
|
|
|
. ./lib.sh
|
|
|
|
. ./tests.sh
|
2021-01-22 17:48:04 +01:00
|
|
|
|
|
|
|
trap 'onexit' INT TERM EXIT
|
|
|
|
|
2021-10-04 11:30:18 +02:00
|
|
|
if [ $# -ne 0 ]; then
|
|
|
|
while [ $# -ne 0 ]; do
|
|
|
|
run_test $1
|
|
|
|
shift
|
|
|
|
done
|
|
|
|
|
|
|
|
tests_done
|
|
|
|
fi
|
|
|
|
|
2022-02-03 09:35:02 +01:00
|
|
|
# Run standalone unit tests.
|
2021-12-09 20:02:09 +01:00
|
|
|
run_test test_punycode
|
|
|
|
run_test test_iri
|
2022-02-03 09:35:02 +01:00
|
|
|
|
2024-04-04 15:07:09 +02:00
|
|
|
# Run configuration dumping test.
|
|
|
|
run_test test_dump_config
|
|
|
|
|
2022-02-03 09:35:02 +01:00
|
|
|
if [ "${SKIP_RUNTIME_TESTS:-0}" -eq 1 ]; then
|
|
|
|
echo
|
|
|
|
echo "======================"
|
|
|
|
echo "runtime tests skipped!"
|
|
|
|
echo "======================"
|
|
|
|
echo
|
|
|
|
|
|
|
|
tests_done
|
|
|
|
fi
|
|
|
|
|
2023-07-25 22:27:31 +02:00
|
|
|
# Run regression tests for the gemexp binary.
|
2023-07-25 22:26:26 +02:00
|
|
|
run_test test_gemexp
|
2022-09-08 22:45:12 +02:00
|
|
|
|
2022-02-03 09:35:02 +01:00
|
|
|
# Run regression tests for the gmid binary.
|
2021-10-04 11:04:33 +02:00
|
|
|
run_test test_static_files
|
|
|
|
run_test test_directory_redirect
|
|
|
|
run_test test_serve_big_files
|
|
|
|
run_test test_dont_execute_scripts
|
|
|
|
run_test test_custom_mime
|
|
|
|
run_test test_default_type
|
|
|
|
run_test test_custom_lang
|
|
|
|
run_test test_parse_custom_lang_per_location
|
|
|
|
run_test test_custom_index
|
|
|
|
run_test test_custom_index_default_type_per_location
|
|
|
|
run_test test_auto_index
|
|
|
|
run_test test_block
|
|
|
|
run_test test_block_return_fmt
|
2023-06-09 11:28:26 +02:00
|
|
|
run_test test_require_client_ca
|
2021-10-04 11:04:33 +02:00
|
|
|
run_test test_root_inside_location
|
|
|
|
run_test test_root_inside_location_with_redirect
|
2023-06-09 12:46:50 +02:00
|
|
|
run_test test_fastcgi
|
2023-07-23 21:04:53 +02:00
|
|
|
run_test test_fastcgi_inside_location
|
2023-07-23 20:45:43 +02:00
|
|
|
run_test test_fastcgi_deprecated_syntax
|
2021-10-04 11:04:33 +02:00
|
|
|
run_test test_macro_expansion
|
2021-12-29 21:36:54 +01:00
|
|
|
run_test test_proxy_relay_to
|
2023-06-09 11:28:26 +02:00
|
|
|
run_test test_proxy_with_certs
|
2022-10-31 23:53:16 +01:00
|
|
|
# run_test test_unknown_host # XXX: breaks on some distro
|
2022-02-26 15:02:45 +01:00
|
|
|
run_test test_include_mime
|
2023-07-24 10:51:35 +02:00
|
|
|
run_test test_log_file
|
2021-10-04 11:04:33 +02:00
|
|
|
|
2023-06-08 15:59:31 +02:00
|
|
|
# TODO: add test that uses only a TLSv1.2 or TLSv1.3
|
2023-07-01 16:11:21 +02:00
|
|
|
# TODO: add a test that attempt to serve a non-regular file
|
|
|
|
# TODO: add a test where the index is not a regular file
|
2023-06-08 15:59:31 +02:00
|
|
|
|
2021-10-04 11:30:18 +02:00
|
|
|
tests_done
|