feat: accept --global on :report subcommands

Every `:report` subcommand now recognizes `--global` as a scope selector that limits the report to globally-configured properties, including in JSON form via `--global --format json`. Previously this combination was rejected because `--global` was treated as an info flag, conflicting with `--format`. The shared `common.ParseReportArgs` helper now returns a `ReportArgs` struct exposing the parsed scope; each Go and bash report selects a global-only flag map when scope is global, and skips per-app verification.
This commit is contained in:
Jose Diaz-Gonzalez committed 2026-04-29 10:30:59 -04:00
1 parent ec70e10c5d
commit 8282981361
61 files changed
+1379 -518

No files matched your search

+19
View File
@@ -28,6 +28,25 @@ teardown() {
assert_output "$help_output"
}
@test "(domains:report) --global --format json" {
run /bin/bash -c "dokku domains:report --global --format json | jq -e ."
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "dokku domains:report --global --format json | jq -r 'keys[]' | grep -v 'global-' | wc -l"
echo "output: $output"
echo "status: $status"
assert_success
assert_output "0"
run /bin/bash -c "dokku domains:report --global"
echo "output: $output"
echo "status: $status"
assert_success
assert_output_contains "Global domains information"
}
@test "(domains) domains" {
run /bin/bash -c "dokku domains:report $TEST_APP 2>/dev/null | grep ${TEST_APP}.${DOKKU_DOMAIN}"
echo "output: $output"