fix: openresty bats global-flag test uses settable key

The previous regression case selected `--openresty-global-hsts`, but `hsts` is rejected by `openresty:set --global` because it is not in the plugin's GLOBAL_KEYS list. Switch to `--openresty-letsencrypt-server`, which the bats setup already pins to a known staging URL, so the test exercises the same `--global --<info-flag>` parsing path without needing a separate set step.
This commit is contained in:
Jose Diaz-Gonzalez
2026-05-01 04:02:26 -04:00
parent e8d8b0683a
commit 60fe2400a9

View File

@@ -18,22 +18,12 @@ teardown() {
dokku nginx:start
}
@test "(openresty:report) --global --openresty-global-hsts" {
run /bin/bash -c "dokku openresty:set --global hsts false"
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "dokku openresty:report --global --openresty-global-hsts"
echo "output: $output"
echo "status: $status"
assert_success
assert_output "false"
run /bin/bash -c "dokku openresty:set --global hsts"
@test "(openresty:report) --global --openresty-letsencrypt-server" {
run /bin/bash -c "dokku openresty:report --global --openresty-letsencrypt-server"
echo "output: $output"
echo "status: $status"
assert_success
assert_output "https://acme-staging-v02.api.letsencrypt.org/directory"
}
@test "(openresty) openresty:help" {