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:
@@ -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" {
|
||||
|
||||
Reference in New Issue
Block a user