test: backfill raw/global/computed report triplet coverage across plugins
The bats coverage for plugin :report keys has been uneven since the raw/global/computed split landed in PR #8640. This commit adds a single combined triplet test per settable property across app-json, builder, builder-dockerfile, builder-herokuish, builder-lambda, builder-nixpacks, builder-pack, builder-railpack, buildpacks, cron (maintenance), git (keep-git-dir, rev-env-var, source-image), logs (vector-sink, vector-global-image, vector-global-networks), network (attach-post-create, attach-post-deploy, initial-network), proxy (per-app type), ps (stop-timeout-seconds), registry (image-repo, push-on-release, push-extra-tags), storage (build/deploy/run mounts), and adds a new tests/unit/scheduler.bats and tests/unit/nginx-vhosts_properties.bats. Brings ps `procfile-path` and `stop-timeout-seconds` global getters in line with the #8640 convention (raw global, default resolved in computed). Documents the read-only and internal properties that surface in `:report` (or are written by Dokku) but cannot be managed by `:set` in a new `## Internal properties` section appended to each affected plugin's docs page.
This commit is contained in:
@@ -76,6 +76,55 @@ teardown() {
|
||||
assert_output "nginx"
|
||||
}
|
||||
|
||||
@test "(proxy:report) type raw vs computed vs global" {
|
||||
run /bin/bash -c "dokku proxy:set --global type"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku --quiet proxy:report $TEST_APP --format json | jq -r '.\"proxy-type\"'"
|
||||
assert_success
|
||||
assert_output ""
|
||||
|
||||
run /bin/bash -c "dokku --quiet proxy:report $TEST_APP --format json | jq -r '.\"proxy-global-type\"'"
|
||||
assert_success
|
||||
assert_output ""
|
||||
|
||||
run /bin/bash -c "dokku --quiet proxy:report $TEST_APP --format json | jq -r '.\"proxy-computed-type\"'"
|
||||
assert_success
|
||||
assert_output "nginx"
|
||||
|
||||
run /bin/bash -c "dokku proxy:set --global type caddy"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku --quiet proxy:report $TEST_APP --format json | jq -r '.\"proxy-global-type\"'"
|
||||
assert_success
|
||||
assert_output "caddy"
|
||||
|
||||
run /bin/bash -c "dokku --quiet proxy:report $TEST_APP --format json | jq -r '.\"proxy-computed-type\"'"
|
||||
assert_success
|
||||
assert_output "caddy"
|
||||
|
||||
run /bin/bash -c "dokku proxy:set $TEST_APP type traefik"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku --quiet proxy:report $TEST_APP --format json | jq -r '.\"proxy-type\"'"
|
||||
assert_success
|
||||
assert_output "traefik"
|
||||
|
||||
run /bin/bash -c "dokku --quiet proxy:report $TEST_APP --format json | jq -r '.\"proxy-global-type\"'"
|
||||
assert_success
|
||||
assert_output "caddy"
|
||||
|
||||
run /bin/bash -c "dokku --quiet proxy:report $TEST_APP --format json | jq -r '.\"proxy-computed-type\"'"
|
||||
assert_success
|
||||
assert_output "traefik"
|
||||
|
||||
run /bin/bash -c "dokku proxy:set $TEST_APP type"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku proxy:set --global type"
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "(proxy:set) invalid port mapping set" {
|
||||
run /bin/bash -c "dokku proxy:set $TEST_APP http:80:80"
|
||||
echo "output: $output"
|
||||
|
||||
Reference in New Issue
Block a user