From 60fe2400a94e6bea955de5a45f210aa6831f000d Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Fri, 1 May 2026 04:02:26 -0400 Subject: [PATCH] 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 --` parsing path without needing a separate set step. --- tests/unit/openresty.bats | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/tests/unit/openresty.bats b/tests/unit/openresty.bats index 5e36a5bb2..b95788a14 100644 --- a/tests/unit/openresty.bats +++ b/tests/unit/openresty.bats @@ -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" {