fix: preserve info flag in plugin reports with --global

The argument-handling block in each plugin's report command overwrote APP with --global before checking whether $1 actually held an info flag, so `dokku <plugin>:report --global --<plugin>-foo` always emitted the full report instead of the requested value. Reorder the conditionals across the sixteen plugins that share the pattern so the info-flag check runs first, and add a regression bats case for each one.
This commit is contained in:
Jose Diaz-Gonzalez
2026-04-30 21:05:46 -04:00
parent 53ef8c7780
commit e8d8b0683a
31 changed files with 278 additions and 50 deletions

View File

@@ -10,6 +10,24 @@ teardown() {
destroy_app
}
@test "(builder-lambda:report) --global --builder-lambda-global-lambdayml-path" {
run /bin/bash -c "dokku builder-lambda:set --global lambdayml-path lambda.alt.yml"
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "dokku builder-lambda:report --global --builder-lambda-global-lambdayml-path"
echo "output: $output"
echo "status: $status"
assert_success
assert_output "lambda.alt.yml"
run /bin/bash -c "dokku builder-lambda:set --global lambdayml-path"
echo "output: $output"
echo "status: $status"
assert_success
}
@test "(builder-lambda:set)" {
run /bin/bash -c "dokku config:set $TEST_APP SECRET_KEY=fjdkslafjdk"
echo "output: $output"