fix: nginx-vhosts globalValue returns raw global for timeout properties
The nginx-property binary's globalValue() switch returned ComputedX for client-body-timeout, client-header-timeout, keepalive-timeout, and lingering-timeout, leaking the per-app value into nginx:report's global-<prop> key. Other properties in the same switch already call GlobalX. Aligns the four with the rest. Also tightens tests/unit/nginx-vhosts_properties.bats so the helper preserves values containing whitespace or literal \$ across the inner /bin/bash -c, and switches proxy-keepalive to integer values since the set subcommand validates it via is_number.
This commit is contained in:
@@ -27,7 +27,7 @@ assert_nginx_property_set_get() {
|
||||
run /bin/bash -c "dokku nginx:set --global $prop"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku nginx:set --global $prop $global_value"
|
||||
run /bin/bash -c "dokku nginx:set --global $prop '$global_value'"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku --quiet nginx:report $TEST_APP --format json | jq -r '.\"global-$prop\"'"
|
||||
@@ -38,7 +38,7 @@ assert_nginx_property_set_get() {
|
||||
assert_success
|
||||
assert_output "$global_value"
|
||||
|
||||
run /bin/bash -c "dokku nginx:set $TEST_APP $prop $app_value"
|
||||
run /bin/bash -c "dokku nginx:set $TEST_APP $prop '$app_value'"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku --quiet nginx:report $TEST_APP --format json | jq -r '.\"$prop\"'"
|
||||
@@ -99,5 +99,5 @@ assert_nginx_property_set_get() {
|
||||
@test "(nginx:report) misc properties raw/global/computed" {
|
||||
assert_nginx_property_set_get "disable-custom-config" "false" "true"
|
||||
assert_nginx_property_set_get "underscore-in-headers" "on" "off"
|
||||
assert_nginx_property_set_get "proxy-keepalive" "on" "off"
|
||||
assert_nginx_property_set_get "proxy-keepalive" "8" "16"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user