Use in tests the generic method to pass config options

Instead of having variables being flipped around, just specify which Nginx
directives are needed in the configuration file.
pull/62/head
Adrian Perez de Castro 2016-12-07 20:20:34 +02:00
parent 5b53c2b0b2
commit ee17ca1a65
No known key found for this signature in database
GPG Key ID: 91C559DBE4C9123B
2 changed files with 1 additions and 6 deletions

View File

@ -2,8 +2,7 @@
cat <<---
We test if the output from using "fancyindex_exact_size off" looks sane
--
EXACT_SIZE="off"
nginx_start
nginx_start 'fancyindex_exact_size off;'
content=$(fetch)
grep -e '[1-9]\.[0-9] KiB' <<< "${content}"
grep -E '[0-9]+ B' <<< "${content}"

View File

@ -6,9 +6,6 @@
# Distributed under terms of the MIT license.
#
# Configuration defaults
EXACT_SIZE="on"
function nginx_conf_generate () {
if ${DYNAMIC} ; then
echo 'load_module modules/ngx_http_fancyindex_module.so;'
@ -30,7 +27,6 @@ function nginx_conf_generate () {
location / {
index index.html;
fancyindex on;
fancyindex_exact_size ${EXACT_SIZE};
$*
}
}