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,55 @@ teardown() {
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "(builder-lambda:report) lambdayml-path raw vs computed vs global" {
|
||||
run /bin/bash -c "dokku builder-lambda:set --global lambdayml-path"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku builder-lambda:report $TEST_APP --builder-lambda-lambdayml-path"
|
||||
assert_success
|
||||
assert_output_not_exists
|
||||
|
||||
run /bin/bash -c "dokku builder-lambda:report $TEST_APP --builder-lambda-global-lambdayml-path"
|
||||
assert_success
|
||||
assert_output_not_exists
|
||||
|
||||
run /bin/bash -c "dokku builder-lambda:report $TEST_APP --builder-lambda-computed-lambdayml-path"
|
||||
assert_success
|
||||
assert_output "lambda.yml"
|
||||
|
||||
run /bin/bash -c "dokku builder-lambda:set --global lambdayml-path lambda.global.yml"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku builder-lambda:report $TEST_APP --builder-lambda-global-lambdayml-path"
|
||||
assert_success
|
||||
assert_output "lambda.global.yml"
|
||||
|
||||
run /bin/bash -c "dokku builder-lambda:report $TEST_APP --builder-lambda-computed-lambdayml-path"
|
||||
assert_success
|
||||
assert_output "lambda.global.yml"
|
||||
|
||||
run /bin/bash -c "dokku builder-lambda:set $TEST_APP lambdayml-path lambda.app.yml"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku builder-lambda:report $TEST_APP --builder-lambda-lambdayml-path"
|
||||
assert_success
|
||||
assert_output "lambda.app.yml"
|
||||
|
||||
run /bin/bash -c "dokku builder-lambda:report $TEST_APP --builder-lambda-global-lambdayml-path"
|
||||
assert_success
|
||||
assert_output "lambda.global.yml"
|
||||
|
||||
run /bin/bash -c "dokku builder-lambda:report $TEST_APP --builder-lambda-computed-lambdayml-path"
|
||||
assert_success
|
||||
assert_output "lambda.app.yml"
|
||||
|
||||
run /bin/bash -c "dokku builder-lambda:set $TEST_APP lambdayml-path"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku builder-lambda:set --global lambdayml-path"
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "(builder-lambda:set)" {
|
||||
run /bin/bash -c "dokku config:set $TEST_APP SECRET_KEY=fjdkslafjdk"
|
||||
echo "output: $output"
|
||||
|
||||
Reference in New Issue
Block a user