fix: expose remaining settable properties via :report
Adds the missing raw/global/computed report keys for ten settable properties across the ps, builder, scheduler, proxy, openresty, nginx, and scheduler-k3s plugins so external tooling can verify drift through `:report --format json`. The scheduler-k3s `token` is masked as `*******` in default stdout output and only unmasked when the report is requested via `--format json` or when the flag is queried explicitly by name; the same explicit-query unmasking rule is extended to the existing traefik `dns-provider-<env_var>` keys.
This commit is contained in:
@@ -12,6 +12,7 @@ setup() {
|
||||
}
|
||||
|
||||
teardown() {
|
||||
dokku openresty:set --global log-level >/dev/null 2>&1 || true
|
||||
global_teardown
|
||||
destroy_app
|
||||
dokku openresty:stop
|
||||
@@ -151,6 +152,66 @@ teardown() {
|
||||
assert_output_exists
|
||||
}
|
||||
|
||||
@test "(openresty:report) --global log-level raw vs computed" {
|
||||
run /bin/bash -c "dokku openresty:report --global --openresty-global-log-level"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output ""
|
||||
|
||||
run /bin/bash -c "dokku openresty:report --global --openresty-computed-log-level"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output "ERROR"
|
||||
|
||||
run /bin/bash -c "dokku openresty:set --global log-level DEBUG"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku openresty:report --global --openresty-global-log-level"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output "DEBUG"
|
||||
|
||||
run /bin/bash -c "dokku openresty:report --global --openresty-computed-log-level"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output "DEBUG"
|
||||
|
||||
run /bin/bash -c "dokku openresty:report --global --format json | jq -r '.\"global-log-level\"'"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output "DEBUG"
|
||||
|
||||
run /bin/bash -c "dokku openresty:report --global --format json | jq -r '.\"computed-log-level\"'"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output "DEBUG"
|
||||
|
||||
run /bin/bash -c "dokku openresty:set --global log-level"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku openresty:report --global --openresty-global-log-level"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output ""
|
||||
|
||||
run /bin/bash -c "dokku openresty:report --global --openresty-computed-log-level"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output "ERROR"
|
||||
}
|
||||
|
||||
@test "(openresty) global-only keys" {
|
||||
for key in allowed-letsencrypt-domains-func-base64 image log-level letsencrypt-email letsencrypt-server; do
|
||||
run /bin/bash -c "dokku openresty:set $TEST_APP $key somevalue"
|
||||
|
||||
Reference in New Issue
Block a user