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:
1 file changed
+3
-13
@@ -18,22 +18,12 @@ teardown() {
|
|||||||
dokku nginx:start
|
dokku nginx:start
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "(openresty:report) --global --openresty-global-hsts" {
|
@test "(openresty:report) --global --openresty-letsencrypt-server" {
|
||||||
run /bin/bash -c "dokku openresty:set --global hsts false"
|
run /bin/bash -c "dokku openresty:report --global --openresty-letsencrypt-server"
|
||||||
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"
|
|
||||||
echo "output: $output"
|
echo "output: $output"
|
||||||
echo "status: $status"
|
echo "status: $status"
|
||||||
assert_success
|
assert_success
|
||||||
|
assert_output "https://acme-staging-v02.api.letsencrypt.org/directory"
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "(openresty) openresty:help" {
|
@test "(openresty) openresty:help" {
|
||||||
|
|||||||
Reference in new issue
Block a user