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
parent
5b53c2b0b2
commit
ee17ca1a65
|
@ -2,8 +2,7 @@
|
||||||
cat <<---
|
cat <<---
|
||||||
We test if the output from using "fancyindex_exact_size off" looks sane
|
We test if the output from using "fancyindex_exact_size off" looks sane
|
||||||
--
|
--
|
||||||
EXACT_SIZE="off"
|
nginx_start 'fancyindex_exact_size off;'
|
||||||
nginx_start
|
|
||||||
content=$(fetch)
|
content=$(fetch)
|
||||||
grep -e '[1-9]\.[0-9] KiB' <<< "${content}"
|
grep -e '[1-9]\.[0-9] KiB' <<< "${content}"
|
||||||
grep -E '[0-9]+ B' <<< "${content}"
|
grep -E '[0-9]+ B' <<< "${content}"
|
||||||
|
|
|
@ -6,9 +6,6 @@
|
||||||
# Distributed under terms of the MIT license.
|
# Distributed under terms of the MIT license.
|
||||||
#
|
#
|
||||||
|
|
||||||
# Configuration defaults
|
|
||||||
EXACT_SIZE="on"
|
|
||||||
|
|
||||||
function nginx_conf_generate () {
|
function nginx_conf_generate () {
|
||||||
if ${DYNAMIC} ; then
|
if ${DYNAMIC} ; then
|
||||||
echo 'load_module modules/ngx_http_fancyindex_module.so;'
|
echo 'load_module modules/ngx_http_fancyindex_module.so;'
|
||||||
|
@ -30,7 +27,6 @@ function nginx_conf_generate () {
|
||||||
location / {
|
location / {
|
||||||
index index.html;
|
index index.html;
|
||||||
fancyindex on;
|
fancyindex on;
|
||||||
fancyindex_exact_size ${EXACT_SIZE};
|
|
||||||
$*
|
$*
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue