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:
Jose Diaz-Gonzalez
2026-05-27 04:26:12 -04:00
parent fd9e06d56b
commit 2b5d2e10ea
28 changed files with 734 additions and 50 deletions

View File

@@ -9,6 +9,7 @@ setup() {
teardown() {
dokku scheduler:set --global selected >/dev/null 2>&1 || true
dokku scheduler:set --global shell >/dev/null 2>&1 || true
destroy_app
global_teardown
}
@@ -76,6 +77,55 @@ teardown() {
assert_success
}
@test "(scheduler:report) shell raw vs computed vs global" {
run /bin/bash -c "dokku scheduler:set --global shell"
assert_success
run /bin/bash -c "dokku scheduler:report $TEST_APP --format json | jq -r '.\"scheduler-shell\"'"
assert_success
assert_output ""
run /bin/bash -c "dokku scheduler:report $TEST_APP --format json | jq -r '.\"scheduler-global-shell\"'"
assert_success
assert_output ""
run /bin/bash -c "dokku scheduler:report $TEST_APP --format json | jq -r '.\"scheduler-computed-shell\"'"
assert_success
assert_output ""
run /bin/bash -c "dokku scheduler:set --global shell sh"
assert_success
run /bin/bash -c "dokku scheduler:report $TEST_APP --format json | jq -r '.\"scheduler-global-shell\"'"
assert_success
assert_output "sh"
run /bin/bash -c "dokku scheduler:report $TEST_APP --format json | jq -r '.\"scheduler-computed-shell\"'"
assert_success
assert_output "sh"
run /bin/bash -c "dokku scheduler:set $TEST_APP shell bash"
assert_success
run /bin/bash -c "dokku scheduler:report $TEST_APP --format json | jq -r '.\"scheduler-shell\"'"
assert_success
assert_output "bash"
run /bin/bash -c "dokku scheduler:report $TEST_APP --format json | jq -r '.\"scheduler-global-shell\"'"
assert_success
assert_output "sh"
run /bin/bash -c "dokku scheduler:report $TEST_APP --format json | jq -r '.\"scheduler-computed-shell\"'"
assert_success
assert_output "bash"
run /bin/bash -c "dokku scheduler:set $TEST_APP shell"
assert_success
run /bin/bash -c "dokku scheduler:set --global shell"
assert_success
}
@test "(scheduler:report) --global --format json" {
run /bin/bash -c "dokku scheduler:set --global selected"
assert_success