diff --git a/tests/lifecycle/bats/ui-coverage.bats b/tests/lifecycle/bats/ui-coverage.bats index 3a5a336b..97c313e6 100644 --- a/tests/lifecycle/bats/ui-coverage.bats +++ b/tests/lifecycle/bats/ui-coverage.bats @@ -27,6 +27,15 @@ setup_file() { unset ARCHY_FORCE_LOGIN HOST="${ARCHY_HOST:-127.0.0.1}" export HOST + # Honour ARCHY_SCHEME like lib/rpc.bash does, defaulting to https so nodes + # that already pass keep testing the TLS path. These probes used to hardcode + # https, which made the whole suite unrunnable on a node that serves the + # dashboard over http: on archi-dev-box :443 is bound to the Tailscale / + # WireGuard / LAN interface addresses but NOT to loopback, while :80 is bound + # on 0.0.0.0 — so every proxy probe failed "curl failed (network/timeout)" + # against http-reachable endpoints that were in fact serving 200. + UI_BASE="${ARCHY_SCHEME:-https}://$HOST" + export UI_BASE } teardown_file() { @@ -37,7 +46,7 @@ teardown_file() { # Dashboard shell + catalog (always required) # ──────────────────────────────────────────────────────────────────── -@test "dashboard https://host/ returns the Vue SPA shell" { +@test "dashboard / returns the Vue SPA shell" { run probe_dashboard_shell [ "$status" -eq 0 ] } @@ -59,30 +68,30 @@ teardown_file() { # HTTPS proxy paths — match HTTPS_PROXY_PATHS in appSessionConfig.ts # ──────────────────────────────────────────────────────────────────── -@test "lnd proxy https://host/app/lnd/ responds when lnd is running" { - probe_app_url lnd "https://$HOST/app/lnd/" "lnd (proxy /app/lnd/)" +@test "lnd proxy /app/lnd/ responds when lnd is running" { + probe_app_url lnd "$UI_BASE/app/lnd/" "lnd (proxy /app/lnd/)" } -@test "electrumx proxy https://host/app/electrumx/ responds when electrumx is running" { +@test "electrumx proxy /app/electrumx/ responds when electrumx is running" { # electrumx companion (archy-electrs-ui) is what serves the iframe HTML; # the electrumx daemon is just the TCP backend. - probe_app_url archy-electrs-ui "https://$HOST/app/electrumx/" "electrumx (proxy /app/electrumx/)" + probe_app_url archy-electrs-ui "$UI_BASE/app/electrumx/" "electrumx (proxy /app/electrumx/)" } -@test "mempool proxy https://host/app/mempool/ responds when mempool is running" { - probe_app_url mempool "https://$HOST/app/mempool/" "mempool (proxy /app/mempool/)" +@test "mempool proxy /app/mempool/ responds when mempool is running" { + probe_app_url mempool "$UI_BASE/app/mempool/" "mempool (proxy /app/mempool/)" } -@test "fedimint proxy https://host/app/fedimint/ responds when fedimint is running" { - probe_app_url fedimint "https://$HOST/app/fedimint/" "fedimint (proxy /app/fedimint/)" +@test "fedimint proxy /app/fedimint/ responds when fedimint is running" { + probe_app_url fedimint "$UI_BASE/app/fedimint/" "fedimint (proxy /app/fedimint/)" } -@test "btcpay proxy https://host/app/btcpay/ responds when btcpay-server is running" { - probe_app_url btcpay-server "https://$HOST/app/btcpay/" "btcpay (proxy /app/btcpay/)" +@test "btcpay proxy /app/btcpay/ responds when btcpay-server is running" { + probe_app_url btcpay-server "$UI_BASE/app/btcpay/" "btcpay (proxy /app/btcpay/)" } -@test "filebrowser proxy https://host/app/filebrowser/ responds when filebrowser is running" { - probe_app_url filebrowser "https://$HOST/app/filebrowser/" "filebrowser (proxy /app/filebrowser/)" +@test "filebrowser proxy /app/filebrowser/ responds when filebrowser is running" { + probe_app_url filebrowser "$UI_BASE/app/filebrowser/" "filebrowser (proxy /app/filebrowser/)" } # ──────────────────────────────────────────────────────────────────── diff --git a/tests/lifecycle/lib/ui-probes.bash b/tests/lifecycle/lib/ui-probes.bash index 038c6892..73b42ea0 100644 --- a/tests/lifecycle/lib/ui-probes.bash +++ b/tests/lifecycle/lib/ui-probes.bash @@ -85,7 +85,7 @@ probe_app_url() { # layout" — see feedback_release_tarball_layout.md. probe_dashboard_shell() { local host="${ARCHY_HOST:-127.0.0.1}" - local url="https://$host/" + local url="${ARCHY_SCHEME:-https}://$host/" local body body=$(curl "${PROBE_CURL_OPTS[@]}" "$url" 2>/dev/null) || { echo "probe_dashboard_shell: $url — curl failed" >&2 @@ -106,7 +106,7 @@ probe_dashboard_shell() { probe_dashboard_catalog() { local host="${ARCHY_HOST:-127.0.0.1}" local body - body=$(curl "${PROBE_CURL_OPTS[@]}" "https://$host/catalog.json" 2>/dev/null) || { + body=$(curl "${PROBE_CURL_OPTS[@]}" "${ARCHY_SCHEME:-https}://$host/catalog.json" 2>/dev/null) || { echo "probe_dashboard_catalog: /catalog.json fetch failed" >&2 return 1 }