fix: reject per-app sets for global-only proxy properties
`caddy:set`, `haproxy:set`, and `traefik:set` previously accepted per-app writes for properties that only have a single host-wide reader, so `:set myapp image foo:bar` printed a success message while `:report myapp` kept showing the global default. The per-app form is now rejected with `The key '<key>' can only be set globally`, matching the existing rejection used for haproxy `refresh-conf` and traefik `challenge-mode`. Caddy `tls-internal` remains the only legitimate per-app property in this family.
This commit is contained in:
@@ -34,6 +34,17 @@ teardown() {
|
||||
assert_output "$help_output"
|
||||
}
|
||||
|
||||
@test "(haproxy) global-only keys" {
|
||||
for key in image log-level letsencrypt-email letsencrypt-server refresh-conf; do
|
||||
run /bin/bash -c "dokku haproxy:set $TEST_APP $key somevalue"
|
||||
echo "key: $key"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_failure
|
||||
assert_output_contains "can only be set globally"
|
||||
done
|
||||
}
|
||||
|
||||
@test "(haproxy) refresh-conf" {
|
||||
run /bin/bash -c "dokku haproxy:set $TEST_APP refresh-conf 2"
|
||||
echo "output: $output"
|
||||
|
||||
Reference in New Issue
Block a user