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
@@ -67,25 +67,25 @@ teardown() {
|
||||
}
|
||||
|
||||
@test "(caddy:report) --global raw and computed keys in --format json" {
|
||||
run /bin/bash -c "dokku --quiet caddy:report --global --format json | jq -r '.\"global-image\"'"
|
||||
run /bin/bash -c "dokku caddy:report --global --format json | jq -r '.\"global-image\"'"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output ""
|
||||
|
||||
run /bin/bash -c "dokku --quiet caddy:report --global --format json | jq -r '.\"computed-image\"'"
|
||||
run /bin/bash -c "dokku caddy:report --global --format json | jq -r '.\"computed-image\"'"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output_exists
|
||||
|
||||
run /bin/bash -c "dokku --quiet caddy:report --global --format json | jq -r '.\"global-polling-interval\"'"
|
||||
run /bin/bash -c "dokku caddy:report --global --format json | jq -r '.\"global-polling-interval\"'"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output ""
|
||||
|
||||
run /bin/bash -c "dokku --quiet caddy:report --global --format json | jq -r '.\"computed-polling-interval\"'"
|
||||
run /bin/bash -c "dokku caddy:report --global --format json | jq -r '.\"computed-polling-interval\"'"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -350,12 +350,12 @@ teardown() {
|
||||
assert_success
|
||||
assert_output "$TEST_APP.${DOKKU_DOMAIN}"
|
||||
|
||||
run /bin/bash -c "dokku --quiet ports:report $TEST_APP --ports-map"
|
||||
run /bin/bash -c "dokku ports:report $TEST_APP --ports-map"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_output_not_exists
|
||||
|
||||
run /bin/bash -c "dokku --quiet ports:report $TEST_APP --ports-map-detected"
|
||||
run /bin/bash -c "dokku ports:report $TEST_APP --ports-map-detected"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_output "http:80:5000 https:443:5000"
|
||||
|
||||
Reference in new issue
Block a user