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:
@@ -52,6 +52,58 @@ teardown() {
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "(builder-herokuish:report) allowed raw vs computed vs global" {
|
||||
local default_allowed="true"
|
||||
[[ "$(dpkg --print-architecture 2>/dev/null || true)" != "amd64" ]] && default_allowed="false"
|
||||
|
||||
run /bin/bash -c "dokku builder-herokuish:set --global allowed"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku builder-herokuish:report $TEST_APP --builder-herokuish-allowed"
|
||||
assert_success
|
||||
assert_output_not_exists
|
||||
|
||||
run /bin/bash -c "dokku builder-herokuish:report $TEST_APP --builder-herokuish-global-allowed"
|
||||
assert_success
|
||||
assert_output_not_exists
|
||||
|
||||
run /bin/bash -c "dokku builder-herokuish:report $TEST_APP --builder-herokuish-computed-allowed"
|
||||
assert_success
|
||||
assert_output "$default_allowed"
|
||||
|
||||
run /bin/bash -c "dokku builder-herokuish:set --global allowed false"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku builder-herokuish:report $TEST_APP --builder-herokuish-global-allowed"
|
||||
assert_success
|
||||
assert_output "false"
|
||||
|
||||
run /bin/bash -c "dokku builder-herokuish:report $TEST_APP --builder-herokuish-computed-allowed"
|
||||
assert_success
|
||||
assert_output "false"
|
||||
|
||||
run /bin/bash -c "dokku builder-herokuish:set $TEST_APP allowed true"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku builder-herokuish:report $TEST_APP --builder-herokuish-allowed"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku builder-herokuish:report $TEST_APP --builder-herokuish-global-allowed"
|
||||
assert_success
|
||||
assert_output "false"
|
||||
|
||||
run /bin/bash -c "dokku builder-herokuish:report $TEST_APP --builder-herokuish-computed-allowed"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku builder-herokuish:set $TEST_APP allowed"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku builder-herokuish:set --global allowed"
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "(builder-herouish:build .env)" {
|
||||
run deploy_app python dokku@$DOKKU_DOMAIN:$TEST_APP
|
||||
echo "output: $output"
|
||||
|
||||
Reference in New Issue
Block a user