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:
@@ -25,6 +25,24 @@ teardown() {
|
||||
global_teardown
|
||||
}
|
||||
|
||||
@test "(builder-railpack:report) --global --builder-railpack-global-railpackjson-path" {
|
||||
run /bin/bash -c "dokku builder-railpack:set --global railpackjson-path railpack.alt.json"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku builder-railpack:report --global --builder-railpack-global-railpackjson-path"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output "railpack.alt.json"
|
||||
|
||||
run /bin/bash -c "dokku builder-railpack:set --global railpackjson-path"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "(builder-railpack:set)" {
|
||||
run /bin/bash -c "dokku config:set $TEST_APP SECRET_KEY=fjdkslafjdk"
|
||||
echo "output: $output"
|
||||
|
||||
Reference in New Issue
Block a user