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:
@@ -29,13 +29,13 @@ teardown() {
|
||||
}
|
||||
|
||||
@test "(proxy:report) --global raw vs computed type" {
|
||||
run /bin/bash -c "dokku --quiet proxy:report --global --format json | jq -r '.\"proxy-global-type\"'"
|
||||
run /bin/bash -c "dokku proxy:report --global --format json | jq -r '.\"proxy-global-type\"'"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output ""
|
||||
|
||||
run /bin/bash -c "dokku --quiet proxy:report --global --format json | jq -r '.\"proxy-computed-type\"'"
|
||||
run /bin/bash -c "dokku proxy:report --global --format json | jq -r '.\"proxy-computed-type\"'"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -46,13 +46,13 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku --quiet proxy:report --global --format json | jq -r '.\"proxy-global-type\"'"
|
||||
run /bin/bash -c "dokku proxy:report --global --format json | jq -r '.\"proxy-global-type\"'"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output "caddy"
|
||||
|
||||
run /bin/bash -c "dokku --quiet proxy:report --global --format json | jq -r '.\"proxy-computed-type\"'"
|
||||
run /bin/bash -c "dokku proxy:report --global --format json | jq -r '.\"proxy-computed-type\"'"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -63,13 +63,13 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku --quiet proxy:report --global --format json | jq -r '.\"proxy-global-type\"'"
|
||||
run /bin/bash -c "dokku proxy:report --global --format json | jq -r '.\"proxy-global-type\"'"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output ""
|
||||
|
||||
run /bin/bash -c "dokku --quiet proxy:report --global --format json | jq -r '.\"proxy-computed-type\"'"
|
||||
run /bin/bash -c "dokku proxy:report --global --format json | jq -r '.\"proxy-computed-type\"'"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -80,41 +80,41 @@ teardown() {
|
||||
run /bin/bash -c "dokku proxy:set --global type"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku --quiet proxy:report $TEST_APP --format json | jq -r '.\"proxy-type\"'"
|
||||
run /bin/bash -c "dokku proxy:report $TEST_APP --format json | jq -r '.\"proxy-type\"'"
|
||||
assert_success
|
||||
assert_output ""
|
||||
|
||||
run /bin/bash -c "dokku --quiet proxy:report $TEST_APP --format json | jq -r '.\"proxy-global-type\"'"
|
||||
run /bin/bash -c "dokku proxy:report $TEST_APP --format json | jq -r '.\"proxy-global-type\"'"
|
||||
assert_success
|
||||
assert_output ""
|
||||
|
||||
run /bin/bash -c "dokku --quiet proxy:report $TEST_APP --format json | jq -r '.\"proxy-computed-type\"'"
|
||||
run /bin/bash -c "dokku proxy:report $TEST_APP --format json | jq -r '.\"proxy-computed-type\"'"
|
||||
assert_success
|
||||
assert_output "nginx"
|
||||
|
||||
run /bin/bash -c "dokku proxy:set --global type caddy"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku --quiet proxy:report $TEST_APP --format json | jq -r '.\"proxy-global-type\"'"
|
||||
run /bin/bash -c "dokku proxy:report $TEST_APP --format json | jq -r '.\"proxy-global-type\"'"
|
||||
assert_success
|
||||
assert_output "caddy"
|
||||
|
||||
run /bin/bash -c "dokku --quiet proxy:report $TEST_APP --format json | jq -r '.\"proxy-computed-type\"'"
|
||||
run /bin/bash -c "dokku proxy:report $TEST_APP --format json | jq -r '.\"proxy-computed-type\"'"
|
||||
assert_success
|
||||
assert_output "caddy"
|
||||
|
||||
run /bin/bash -c "dokku proxy:set $TEST_APP type traefik"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku --quiet proxy:report $TEST_APP --format json | jq -r '.\"proxy-type\"'"
|
||||
run /bin/bash -c "dokku proxy:report $TEST_APP --format json | jq -r '.\"proxy-type\"'"
|
||||
assert_success
|
||||
assert_output "traefik"
|
||||
|
||||
run /bin/bash -c "dokku --quiet proxy:report $TEST_APP --format json | jq -r '.\"proxy-global-type\"'"
|
||||
run /bin/bash -c "dokku proxy:report $TEST_APP --format json | jq -r '.\"proxy-global-type\"'"
|
||||
assert_success
|
||||
assert_output "caddy"
|
||||
|
||||
run /bin/bash -c "dokku --quiet proxy:report $TEST_APP --format json | jq -r '.\"proxy-computed-type\"'"
|
||||
run /bin/bash -c "dokku proxy:report $TEST_APP --format json | jq -r '.\"proxy-computed-type\"'"
|
||||
assert_success
|
||||
assert_output "traefik"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user