refactor: rename computed-* helpers, expose computed vector and network keys
Addresses review feedback on #8640. fn-archive-max-size, fn-archive-max-files, fn-git-deploy-branch, and fn-git-keep-git-dir are renamed with `computed` in the function name so the names match the resolved-with-default semantic they implement, and every caller is updated in lockstep. logs:report renames the misordered --logs-vector-global-image and --logs-vector-global-networks to --logs-global-vector-image and --logs-global-vector-networks, makes the global getters return the raw stored value, and adds --logs-computed-vector-image, --logs-computed-vector-networks, and --logs-computed-vector-sink. network:report --global gains the computed-* keys for attach-post-create, attach-post-deploy, initial-network, and tld so external tooling can read the resolved value at global scope. The --quiet flag is dropped from every :report --format json | jq invocation across the PR's bats files; the report's --format json output is the only stdout and the flag is redundant.
This commit is contained in:
22 files changed
+200
-174
No files matched your search
@@ -172,41 +172,41 @@ web
|
||||
run /bin/bash -c "dokku ps:set --global stop-timeout-seconds"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku --quiet ps:report $TEST_APP --format json | jq -r '.\"stop-timeout-seconds\"'"
|
||||
run /bin/bash -c "dokku ps:report $TEST_APP --format json | jq -r '.\"stop-timeout-seconds\"'"
|
||||
assert_success
|
||||
assert_output ""
|
||||
|
||||
run /bin/bash -c "dokku --quiet ps:report $TEST_APP --format json | jq -r '.\"global-stop-timeout-seconds\"'"
|
||||
run /bin/bash -c "dokku ps:report $TEST_APP --format json | jq -r '.\"global-stop-timeout-seconds\"'"
|
||||
assert_success
|
||||
assert_output ""
|
||||
|
||||
run /bin/bash -c "dokku --quiet ps:report $TEST_APP --format json | jq -r '.\"computed-stop-timeout-seconds\"'"
|
||||
run /bin/bash -c "dokku ps:report $TEST_APP --format json | jq -r '.\"computed-stop-timeout-seconds\"'"
|
||||
assert_success
|
||||
assert_output "30"
|
||||
|
||||
run /bin/bash -c "dokku ps:set --global stop-timeout-seconds 90"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku --quiet ps:report $TEST_APP --format json | jq -r '.\"global-stop-timeout-seconds\"'"
|
||||
run /bin/bash -c "dokku ps:report $TEST_APP --format json | jq -r '.\"global-stop-timeout-seconds\"'"
|
||||
assert_success
|
||||
assert_output "90"
|
||||
|
||||
run /bin/bash -c "dokku --quiet ps:report $TEST_APP --format json | jq -r '.\"computed-stop-timeout-seconds\"'"
|
||||
run /bin/bash -c "dokku ps:report $TEST_APP --format json | jq -r '.\"computed-stop-timeout-seconds\"'"
|
||||
assert_success
|
||||
assert_output "90"
|
||||
|
||||
run /bin/bash -c "dokku ps:set $TEST_APP stop-timeout-seconds 45"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku --quiet ps:report $TEST_APP --format json | jq -r '.\"stop-timeout-seconds\"'"
|
||||
run /bin/bash -c "dokku ps:report $TEST_APP --format json | jq -r '.\"stop-timeout-seconds\"'"
|
||||
assert_success
|
||||
assert_output "45"
|
||||
|
||||
run /bin/bash -c "dokku --quiet ps:report $TEST_APP --format json | jq -r '.\"global-stop-timeout-seconds\"'"
|
||||
run /bin/bash -c "dokku ps:report $TEST_APP --format json | jq -r '.\"global-stop-timeout-seconds\"'"
|
||||
assert_success
|
||||
assert_output "90"
|
||||
|
||||
run /bin/bash -c "dokku --quiet ps:report $TEST_APP --format json | jq -r '.\"computed-stop-timeout-seconds\"'"
|
||||
run /bin/bash -c "dokku ps:report $TEST_APP --format json | jq -r '.\"computed-stop-timeout-seconds\"'"
|
||||
assert_success
|
||||
assert_output "45"
|
||||
|
||||
@@ -218,7 +218,7 @@ web
|
||||
}
|
||||
|
||||
@test "(ps:restart-policy) default policy" {
|
||||
run /bin/bash -c "dokku --quiet ps:report $TEST_APP --ps-restart-policy"
|
||||
run /bin/bash -c "dokku ps:report $TEST_APP --ps-restart-policy"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_output "on-failure:10"
|
||||
@@ -231,7 +231,7 @@ web
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku --quiet ps:report $TEST_APP --ps-restart-policy"
|
||||
run /bin/bash -c "dokku ps:report $TEST_APP --ps-restart-policy"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_output "$policy"
|
||||
@@ -245,7 +245,7 @@ web
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku --quiet ps:report $TEST_APP --ps-restart-policy"
|
||||
run /bin/bash -c "dokku ps:report $TEST_APP --ps-restart-policy"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_output "$test_restart_policy"
|
||||
|
||||
Reference in new issue
Block a user