fix: align Go-plugin :report JSON keys with bash-strip convention
Every Go-implemented plugin's `:report --format json` now emits keys without the redundant `<plugin>-` head segment, matching the shape bash plugins have always emitted. The CLI flag names and `:set` semantics are unchanged. For backwards compatibility during the 0.38.x patch series, the legacy `<plugin>-<property>` keys are emitted side-by-side with the new keys, and a future major release will drop the legacy keys. `common.ReportSingleApp` is refactored to accept a `ReportSingleAppInput` struct with a `Validate()` method so the input is checked before any work runs, which also catches the latent `"docker options"` reportType bug at the API boundary.
This commit is contained in:
@@ -287,6 +287,9 @@ teardown() {
|
||||
assert_output_contains '"app-json-appjson-path":"app2.json"'
|
||||
assert_output_contains '"app-json-computed-appjson-path":"app2.json"'
|
||||
assert_output_contains '"app-json-global-appjson-path":""'
|
||||
assert_output_contains '"appjson-path":"app2.json"'
|
||||
assert_output_contains '"computed-appjson-path":"app2.json"'
|
||||
assert_output_contains '"global-appjson-path":""'
|
||||
assert_output_contains "app-json-selected" 0
|
||||
|
||||
run /bin/bash -c "dokku app-json:report $TEST_APP --app-json-selected"
|
||||
|
||||
@@ -367,3 +367,21 @@ teardown() {
|
||||
|
||||
destroy_app
|
||||
}
|
||||
|
||||
@test "(apps:report) emits new stripped JSON keys alongside legacy" {
|
||||
create_app
|
||||
|
||||
run /bin/bash -c "dokku apps:report $TEST_APP --format json | jq -r 'has(\"dir\") and has(\"app-dir\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku apps:report $TEST_APP --format json | jq -r 'has(\"locked\") and has(\"app-locked\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku apps:report $TEST_APP --format json | jq -r 'has(\"deploy-source\") and has(\"app-deploy-source\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
destroy_app
|
||||
}
|
||||
|
||||
@@ -193,12 +193,30 @@ teardown() {
|
||||
assert_success
|
||||
assert_output "dockerfile"
|
||||
|
||||
run /bin/bash -c "dokku builder:report --global --format json | jq -r '.\"global-selected\"'"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output "dockerfile"
|
||||
|
||||
run /bin/bash -c "dokku builder:report --global --format json | jq -r 'has(\"builder-selected\")'"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output "false"
|
||||
|
||||
run /bin/bash -c "dokku builder:report --global --format json | jq -r 'has(\"selected\") and has(\"builder-global-selected\")'"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output "false"
|
||||
|
||||
run /bin/bash -c "dokku builder:report --global --format json | jq -r 'has(\"computed-skip-cleanup\") and has(\"builder-computed-skip-cleanup\")'"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku builder:report --global"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
|
||||
@@ -236,6 +236,24 @@ teardown() {
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "(buildpacks:report) emits new stripped JSON keys alongside legacy" {
|
||||
run /bin/bash -c "dokku buildpacks:report $TEST_APP --format json | jq -r 'has(\"stack\") and has(\"buildpacks-stack\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku buildpacks:report $TEST_APP --format json | jq -r 'has(\"global-stack\") and has(\"buildpacks-global-stack\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku buildpacks:report $TEST_APP --format json | jq -r 'has(\"computed-stack\") and has(\"buildpacks-computed-stack\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku buildpacks:report $TEST_APP --format json | jq -r 'has(\"list\") and has(\"buildpacks-list\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
}
|
||||
|
||||
@test "(buildpacks) buildpacks:remove" {
|
||||
run /bin/bash -c "dokku buildpacks:set $TEST_APP heroku/nodejs"
|
||||
echo "output: $output"
|
||||
|
||||
@@ -331,3 +331,22 @@ EOF
|
||||
# Recreate so teardown can run cleanly.
|
||||
create_app
|
||||
}
|
||||
|
||||
@test "(builds:report) emits new stripped JSON keys alongside legacy" {
|
||||
run /bin/bash -c "dokku builds:report $TEST_APP --format json | jq -r 'has(\"retention\") and has(\"builds-retention\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku builds:report $TEST_APP --format json | jq -r 'has(\"global-retention\") and has(\"builds-global-retention\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku builds:report $TEST_APP --format json | jq -r 'has(\"computed-retention\") and has(\"builds-computed-retention\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
# build-* status keys have no plugin-prefix collision, so they pass through unchanged
|
||||
run /bin/bash -c "dokku builds:report $TEST_APP --format json | jq -r 'has(\"build-id\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
}
|
||||
|
||||
@@ -124,26 +124,50 @@ teardown() {
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku cron:report --global --format json | jq -r 'has(\"global-maintenance\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku cron:report --global --format json | jq -r 'has(\"cron-computed-maintenance\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku cron:report --global --format json | jq -r 'has(\"computed-maintenance\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku cron:report --global --format json | jq -r 'has(\"cron-global-mailfrom\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku cron:report --global --format json | jq -r 'has(\"global-mailfrom\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku cron:report --global --format json | jq -r 'has(\"cron-computed-mailfrom\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku cron:report --global --format json | jq -r 'has(\"computed-mailfrom\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku cron:report --global --format json | jq -r 'has(\"cron-global-mailto\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku cron:report --global --format json | jq -r 'has(\"global-mailto\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku cron:report --global --format json | jq -r 'has(\"cron-computed-mailto\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku cron:report --global --format json | jq -r 'has(\"computed-mailto\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku cron:report --global"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
|
||||
@@ -184,9 +184,11 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output_contains '"docker-options-deploy.web"'
|
||||
assert_output_contains "-p 8080:5000"
|
||||
assert_output_contains '"deploy.web"'
|
||||
assert_output_contains "-p 8080:5000" 2
|
||||
assert_output_contains '"docker-options-deploy"'
|
||||
assert_output_contains "-v /logs:/logs"
|
||||
assert_output_contains '"deploy"'
|
||||
assert_output_contains "-v /logs:/logs" 2
|
||||
}
|
||||
|
||||
@test "(docker-options) clone copies default and per-process options" {
|
||||
|
||||
@@ -965,3 +965,28 @@ teardown() {
|
||||
assert_success
|
||||
assert_output_contains "Stopping and removing vector container"
|
||||
}
|
||||
|
||||
@test "(logs:report) emits new stripped JSON keys alongside legacy" {
|
||||
run create_app
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku logs:report $TEST_APP --format json | jq -r 'has(\"vector-sink\") and has(\"logs-vector-sink\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku logs:report $TEST_APP --format json | jq -r 'has(\"global-vector-sink\") and has(\"logs-global-vector-sink\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku logs:report $TEST_APP --format json | jq -r 'has(\"computed-vector-sink\") and has(\"logs-computed-vector-sink\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku logs:report $TEST_APP --format json | jq -r 'has(\"max-size\") and has(\"logs-max-size\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku logs:report --global --format json | jq -r 'has(\"global-vector-image\") and has(\"logs-global-vector-image\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
}
|
||||
|
||||
@@ -48,12 +48,24 @@ teardown() {
|
||||
assert_success
|
||||
assert_output "dokku.test"
|
||||
|
||||
run /bin/bash -c "dokku network:report --global --format json | jq -r '.\"global-tld\"'"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output "dokku.test"
|
||||
|
||||
run /bin/bash -c "dokku network:report --global --format json | jq -r 'has(\"network-tld\")'"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output "false"
|
||||
|
||||
run /bin/bash -c "dokku network:report --global --format json | jq -r 'has(\"tld\")'"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output "false"
|
||||
|
||||
run /bin/bash -c "dokku network:report --global"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
@@ -66,6 +78,24 @@ teardown() {
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "(network:report) emits new stripped JSON keys alongside legacy" {
|
||||
run /bin/bash -c "dokku network:report --global --format json | jq -r 'has(\"global-tld\") and has(\"network-global-tld\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku network:report --global --format json | jq -r 'has(\"computed-tld\") and has(\"network-computed-tld\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku network:report $TEST_APP --format json | jq -r 'has(\"tld\") and has(\"network-tld\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku network:report $TEST_APP --format json | jq -r 'has(\"web-listeners\") and has(\"network-web-listeners\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
}
|
||||
|
||||
@test "(network:report) tld raw vs computed" {
|
||||
run /bin/bash -c "dokku network:set --global tld"
|
||||
echo "output: $output"
|
||||
|
||||
@@ -370,3 +370,13 @@ teardown() {
|
||||
assert_success
|
||||
assert_output "http:3001:3001"
|
||||
}
|
||||
|
||||
@test "(ports:report) emits new stripped JSON keys alongside legacy" {
|
||||
run /bin/bash -c "dokku ports:report $TEST_APP --format json | jq -r 'has(\"map\") and has(\"ports-map\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku ports:report $TEST_APP --format json | jq -r 'has(\"map-detected\") and has(\"ports-map-detected\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
}
|
||||
|
||||
@@ -372,3 +372,21 @@ teardown() {
|
||||
assert_not_external_port $(<$CID_FILE)
|
||||
done
|
||||
}
|
||||
|
||||
@test "(proxy:report) emits new stripped JSON keys alongside legacy" {
|
||||
run /bin/bash -c "dokku proxy:report $TEST_APP --format json | jq -r 'has(\"type\") and has(\"proxy-type\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku proxy:report $TEST_APP --format json | jq -r 'has(\"global-type\") and has(\"proxy-global-type\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku proxy:report $TEST_APP --format json | jq -r 'has(\"computed-type\") and has(\"proxy-computed-type\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku proxy:report $TEST_APP --format json | jq -r 'has(\"enabled\") and has(\"proxy-enabled\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
}
|
||||
|
||||
@@ -284,14 +284,26 @@ web
|
||||
assert_success
|
||||
assert_output ""
|
||||
|
||||
run /bin/bash -c "dokku ps:report $TEST_APP --format json | jq -r '.\"stop-timeout-seconds\"'"
|
||||
assert_success
|
||||
assert_output ""
|
||||
|
||||
run /bin/bash -c "dokku ps:report $TEST_APP --format json | jq -r '.\"ps-global-stop-timeout-seconds\"'"
|
||||
assert_success
|
||||
assert_output ""
|
||||
|
||||
run /bin/bash -c "dokku ps:report $TEST_APP --format json | jq -r '.\"global-stop-timeout-seconds\"'"
|
||||
assert_success
|
||||
assert_output ""
|
||||
|
||||
run /bin/bash -c "dokku ps:report $TEST_APP --format json | jq -r '.\"ps-computed-stop-timeout-seconds\"'"
|
||||
assert_success
|
||||
assert_output "30"
|
||||
|
||||
run /bin/bash -c "dokku ps:report $TEST_APP --format json | jq -r '.\"computed-stop-timeout-seconds\"'"
|
||||
assert_success
|
||||
assert_output "30"
|
||||
|
||||
run /bin/bash -c "dokku ps:set --global stop-timeout-seconds 90"
|
||||
assert_success
|
||||
|
||||
@@ -299,10 +311,18 @@ web
|
||||
assert_success
|
||||
assert_output "90"
|
||||
|
||||
run /bin/bash -c "dokku ps:report $TEST_APP --format json | jq -r '.\"global-stop-timeout-seconds\"'"
|
||||
assert_success
|
||||
assert_output "90"
|
||||
|
||||
run /bin/bash -c "dokku ps:report $TEST_APP --format json | jq -r '.\"ps-computed-stop-timeout-seconds\"'"
|
||||
assert_success
|
||||
assert_output "90"
|
||||
|
||||
run /bin/bash -c "dokku ps:report $TEST_APP --format json | jq -r '.\"computed-stop-timeout-seconds\"'"
|
||||
assert_success
|
||||
assert_output "90"
|
||||
|
||||
run /bin/bash -c "dokku ps:set $TEST_APP stop-timeout-seconds 45"
|
||||
assert_success
|
||||
|
||||
@@ -310,6 +330,10 @@ web
|
||||
assert_success
|
||||
assert_output "45"
|
||||
|
||||
run /bin/bash -c "dokku ps:report $TEST_APP --format json | jq -r '.\"stop-timeout-seconds\"'"
|
||||
assert_success
|
||||
assert_output "45"
|
||||
|
||||
run /bin/bash -c "dokku ps:report $TEST_APP --format json | jq -r '.\"ps-global-stop-timeout-seconds\"'"
|
||||
assert_success
|
||||
assert_output "90"
|
||||
@@ -318,6 +342,10 @@ web
|
||||
assert_success
|
||||
assert_output "45"
|
||||
|
||||
run /bin/bash -c "dokku ps:report $TEST_APP --format json | jq -r '.\"computed-stop-timeout-seconds\"'"
|
||||
assert_success
|
||||
assert_output "45"
|
||||
|
||||
run /bin/bash -c "dokku ps:set $TEST_APP stop-timeout-seconds"
|
||||
assert_success
|
||||
|
||||
@@ -335,18 +363,34 @@ web
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku ps:report --global --format json | jq -r 'has(\"global-procfile-path\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku ps:report --global --format json | jq -r 'has(\"ps-computed-procfile-path\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku ps:report --global --format json | jq -r 'has(\"computed-procfile-path\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku ps:report --global --format json | jq -r 'has(\"ps-global-stop-timeout-seconds\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku ps:report --global --format json | jq -r 'has(\"global-stop-timeout-seconds\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku ps:report --global --format json | jq -r 'has(\"ps-computed-stop-timeout-seconds\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku ps:report --global --format json | jq -r 'has(\"computed-stop-timeout-seconds\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku ps:set --global stop-timeout-seconds 75"
|
||||
assert_success
|
||||
|
||||
@@ -354,10 +398,18 @@ web
|
||||
assert_success
|
||||
assert_output "75"
|
||||
|
||||
run /bin/bash -c "dokku ps:report --global --format json | jq -r '.\"global-stop-timeout-seconds\"'"
|
||||
assert_success
|
||||
assert_output "75"
|
||||
|
||||
run /bin/bash -c "dokku ps:report --global --format json | jq -r '.\"ps-computed-stop-timeout-seconds\"'"
|
||||
assert_success
|
||||
assert_output "75"
|
||||
|
||||
run /bin/bash -c "dokku ps:report --global --format json | jq -r '.\"computed-stop-timeout-seconds\"'"
|
||||
assert_success
|
||||
assert_output "75"
|
||||
|
||||
run /bin/bash -c "dokku ps:set --global stop-timeout-seconds"
|
||||
assert_success
|
||||
|
||||
@@ -365,9 +417,17 @@ web
|
||||
assert_success
|
||||
assert_output ""
|
||||
|
||||
run /bin/bash -c "dokku ps:report --global --format json | jq -r '.\"global-stop-timeout-seconds\"'"
|
||||
assert_success
|
||||
assert_output ""
|
||||
|
||||
run /bin/bash -c "dokku ps:report --global --format json | jq -r '.\"ps-computed-stop-timeout-seconds\"'"
|
||||
assert_success
|
||||
assert_output "30"
|
||||
|
||||
run /bin/bash -c "dokku ps:report --global --format json | jq -r '.\"computed-stop-timeout-seconds\"'"
|
||||
assert_success
|
||||
assert_output "30"
|
||||
}
|
||||
|
||||
@test "(ps:restart-policy) default policy" {
|
||||
|
||||
@@ -717,3 +717,29 @@ teardown() {
|
||||
assert_success
|
||||
assert_output_contains "dokku/test-app:foo"
|
||||
}
|
||||
|
||||
@test "(registry:report) emits new stripped JSON keys alongside legacy" {
|
||||
run /bin/bash -c "dokku registry:report $TEST_APP --format json | jq -r 'has(\"image-repo\") and has(\"registry-image-repo\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku registry:report $TEST_APP --format json | jq -r 'has(\"computed-image-repo\") and has(\"registry-computed-image-repo\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku registry:report $TEST_APP --format json | jq -r 'has(\"push-on-release\") and has(\"registry-push-on-release\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku registry:report $TEST_APP --format json | jq -r 'has(\"global-push-on-release\") and has(\"registry-global-push-on-release\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku registry:report $TEST_APP --format json | jq -r 'has(\"computed-server\") and has(\"registry-computed-server\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku registry:report --global --format json | jq -r 'has(\"global-image-repo-template\") and has(\"registry-global-image-repo-template\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
}
|
||||
|
||||
@@ -158,3 +158,21 @@ assert_k3s_global_unset_set() {
|
||||
run /bin/bash -c "dokku scheduler-k3s:set --global token"
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "(scheduler-k3s:report) emits new stripped JSON keys alongside legacy" {
|
||||
run /bin/bash -c "dokku scheduler-k3s:report --global --format json | jq -r 'has(\"global-deploy-timeout\") and has(\"scheduler-k3s-global-deploy-timeout\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku scheduler-k3s:report --global --format json | jq -r 'has(\"computed-deploy-timeout\") and has(\"scheduler-k3s-computed-deploy-timeout\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku scheduler-k3s:report --global --format json | jq -r 'has(\"global-namespace\") and has(\"scheduler-k3s-global-namespace\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku scheduler-k3s:report --global --format json | jq -r 'has(\"computed-namespace\") and has(\"scheduler-k3s-computed-namespace\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
}
|
||||
|
||||
@@ -145,3 +145,21 @@ teardown() {
|
||||
assert_success
|
||||
assert_output "false"
|
||||
}
|
||||
|
||||
@test "(scheduler:report) emits new stripped JSON keys alongside legacy" {
|
||||
run /bin/bash -c "dokku scheduler:report $TEST_APP --format json | jq -r 'has(\"selected\") and has(\"scheduler-selected\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku scheduler:report $TEST_APP --format json | jq -r 'has(\"global-selected\") and has(\"scheduler-global-selected\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku scheduler:report $TEST_APP --format json | jq -r 'has(\"computed-selected\") and has(\"scheduler-computed-selected\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku scheduler:report --global --format json | jq -r 'has(\"global-selected\") and has(\"scheduler-global-selected\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
}
|
||||
|
||||
@@ -486,3 +486,17 @@ teardown() {
|
||||
run /bin/bash -c "sudo test -e $flag_dir/$TEST_APP"
|
||||
assert_failure
|
||||
}
|
||||
|
||||
@test "(storage:report) emits new stripped JSON keys alongside legacy" {
|
||||
run /bin/bash -c "dokku storage:report $TEST_APP --format json | jq -r 'has(\"build-mounts\") and has(\"storage-build-mounts\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku storage:report $TEST_APP --format json | jq -r 'has(\"deploy-mounts\") and has(\"storage-deploy-mounts\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
|
||||
run /bin/bash -c "dokku storage:report $TEST_APP --format json | jq -r 'has(\"run-mounts\") and has(\"storage-run-mounts\")'"
|
||||
assert_success
|
||||
assert_output "true"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user