fix: report info-flag should not error when app undeployed
Several plugin `:report` subcommands erroneously failed with `not deployed` when an info-flag matched a property that was empty. Empty values are legitimate for configuration properties pre-deploy and the `--format json` path already returns them without error. Remove the `value_exists` check across nginx, checks, git, certs, scheduler-docker-local, and the builder-* plugins so the info-flag form behaves consistently with the JSON form.
This commit is contained in:
@@ -25,6 +25,30 @@ teardown() {
|
||||
global_teardown
|
||||
}
|
||||
|
||||
@test "(builder-railpack:report) info-flag works before deploy" {
|
||||
run /bin/bash -c "dokku builder-railpack:report $TEST_APP --builder-railpack-railpackjson-path"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku builder-railpack:set $TEST_APP railpackjson-path railpack.alt.json"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku builder-railpack:report $TEST_APP --builder-railpack-railpackjson-path"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output "railpack.alt.json"
|
||||
|
||||
run /bin/bash -c "dokku builder-railpack:report $TEST_APP --builder-railpack-invalid-flag"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_failure
|
||||
assert_output_contains "Invalid flag passed"
|
||||
}
|
||||
|
||||
@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"
|
||||
|
||||
Reference in New Issue
Block a user