test: align triplet tests with actual plugin behavior
Fixes CI failures from the prior commit's bats additions. storage report mounts are prefixed with `-v `, logs.bats setup does not auto-create the test app, the nginx-vhosts shell report emits JSON keys without the `nginx-` plugin prefix, registry computed-image-repo falls back to the default `dokku/<app>` repo name when no template is set, cron computed-maintenance follows OR-not-override semantics so a per-app `false` does not override a global `true`, the scheduler subcommand help string is `Manage scheduler settings`, and bringing ps procfile-path into the #8640 raw convention required updating the pre-existing `(ps:set) procfile` assertion. Also extends fn-git-keep-git-dir to fall back through the global property before the built-in default so global keep-git-dir actually takes effect at deploy time.
This commit is contained in:
@@ -200,7 +200,7 @@ teardown() {
|
||||
|
||||
run /bin/bash -c "dokku --quiet cron:report $TEST_APP --format json | jq -r '.\"cron-computed-maintenance\"'"
|
||||
assert_success
|
||||
assert_output ""
|
||||
assert_output "false"
|
||||
|
||||
run /bin/bash -c "dokku cron:set --global maintenance true"
|
||||
assert_success
|
||||
@@ -213,20 +213,24 @@ teardown() {
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku cron:set $TEST_APP maintenance false"
|
||||
run /bin/bash -c "dokku cron:set $TEST_APP maintenance true"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku --quiet cron:report $TEST_APP --format json | jq -r '.\"cron-maintenance\"'"
|
||||
assert_success
|
||||
assert_output "false"
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku --quiet cron:report $TEST_APP --format json | jq -r '.\"cron-global-maintenance\"'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
# cron computed-maintenance returns "true" if either per-app or global is
|
||||
# "true" (cron's logic at plugins/cron/report.go::reportComputedMaintenance
|
||||
# is OR-not-override: any "true" wins). This is intentional for maintenance
|
||||
# mode - a per-app "false" does NOT override a global "true".
|
||||
run /bin/bash -c "dokku --quiet cron:report $TEST_APP --format json | jq -r '.\"cron-computed-maintenance\"'"
|
||||
assert_success
|
||||
assert_output "false"
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku cron:set $TEST_APP maintenance"
|
||||
assert_success
|
||||
|
||||
Reference in New Issue
Block a user