refactor: consolidate property fetching for nginx plugin into golang codebase

Also update the documentation to include docs for all properties.
This commit is contained in:
Jose Diaz-Gonzalez
2024-02-05 13:25:03 -05:00
parent 6625846ecc
commit d4b445985b
14 changed files with 1448 additions and 492 deletions

View File

@@ -20,6 +20,26 @@ teardown() {
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;"
run /bin/bash -c "dokku nginx:set $TEST_APP client-max-body-size 2m"
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "dokku proxy: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 2m;"
run /bin/bash -c "dokku nginx:set $TEST_APP client-max-body-size"
echo "output: $output"
echo "status: $status"
@@ -33,22 +53,7 @@ teardown() {
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 proxy: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
assert_output_contains "client_max_body_size 1m;"
}
@test "(nginx-vhosts) nginx:set proxy-read-timeout" {