feat: add ability to set client max body size via nginx:set

This simplifies increasing upload size by making it a property, and is backwards compatible with installations that have set that in a custom file.
This commit is contained in:
Jose Diaz-Gonzalez
2021-01-13 11:27:22 -05:00
parent bce0671057
commit 277e9691e1
6 changed files with 79 additions and 5 deletions

View File

@@ -16,6 +16,40 @@ teardown() {
global_teardown
}
@test "(nginx-vhosts) nginx:set client-max-body-size" {
deploy_app
run /bin/bash -c "dokku nginx:set $TEST_APP client-max-body-size"
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "dokku nginx:show-config $TEST_APP"
echo "output: $output"
echo "status: $status"
assert_output_contains "client_max_body_size" 0
run /bin/bash -c "dokku nginx:set $TEST_APP client-max-body-size 1m"
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "dokku nginx:show-config $TEST_APP"
echo "output: $output"
echo "status: $status"
assert_output_contains "client_max_body_size 1m;" 1
}
@test "(nginx-vhosts) nginx:set proxy-read-timeout" {
deploy_app