monitoring: soft-skip GOA-only landing assets off-GOA

This commit is contained in:
Hernâni Marques 2026-07-17 17:03:37 +02:00
parent 3d5f412af3
commit e46aeb408a
No known key found for this signature in database
GPG key ID: CB5738652768F7E9
2 changed files with 42 additions and 17 deletions

View file

@ -705,7 +705,7 @@ if [ "$code" = "200" ]; then
check_url_soft "bank /webui/" 200 "$BANK_PUBLIC/webui/"
check_url_soft "bank /intro/" 200 "$BANK_PUBLIC/intro/"
check_url_soft "bank /" 302,301,200 "$BANK_PUBLIC/"
# Auto-account: credentials + shared-pool taler://withdraw (like step 2)
# Auto-account: GOA shared-pool mint (hacktivism). Not used on TESTPAYSAN stage.
aa_code=$(http_body "$BANK_PUBLIC/intro/auto-account.json" "$tmp/aa.json")
case "$aa_code" in
200)
@ -715,11 +715,22 @@ if [ "$code" = "200" ]; then
fail "bank /intro/auto-account.json" "invalid withdraw/login ($(tr '\n' ' ' <"$tmp/aa-val" | sed 's/[[:space:]]*$//'))"
fi
;;
405|501|404|502|503|000)
fail "bank /intro/auto-account.json" "HTTP $aa_code (want 200; 405/501 = broken)"
404|405|501)
if [ "${EXPECT_CURRENCY:-}" = "GOA" ] || [ "${LOCAL_STACK:-0}" = "1" ]; then
fail "bank /intro/auto-account.json" "HTTP $aa_code (want 200; 405/501 = broken)"
else
info "bank /intro/auto-account.json" "HTTP $aa_code — skip (not a GOA auto-account stack)"
fi
;;
502|503|000)
fail "bank /intro/auto-account.json" "HTTP $aa_code want 200"
;;
*)
fail "bank /intro/auto-account.json" "HTTP $aa_code want 200"
if [ "${EXPECT_CURRENCY:-}" = "GOA" ] || [ "${LOCAL_STACK:-0}" = "1" ]; then
fail "bank /intro/auto-account.json" "HTTP $aa_code want 200"
else
warn "bank /intro/auto-account.json" "HTTP $aa_code (optional off-GOA)"
fi
;;
esac
fi
@ -1003,18 +1014,24 @@ check_one_landing() {
return
fi
# Required static assets (hard: qrcode + og; soft: qr-logo)
for url in \
"${base}/intro/qrcode.min.js" \
"${base}/intro/og-goa-shop.png"
do
if _landing_probe "$url"; then
a_ok=$((a_ok + 1))
else
# Required static: qrcode.min.js. GOA og image is soft off-GOA (stage has no og-goa-shop.png).
if _landing_probe "${base}/intro/qrcode.min.js"; then
a_ok=$((a_ok + 1))
else
a_fail=$((a_fail + 1))
fail_sample="${fail_sample}${fail_sample:+; }HTTP ${_landing_code} ${base}/intro/qrcode.min.js"
fi
if _landing_probe "${base}/intro/og-goa-shop.png"; then
a_ok=$((a_ok + 1))
else
if [ "${EXPECT_CURRENCY:-}" = "GOA" ] || [ "${LOCAL_STACK:-0}" = "1" ]; then
a_fail=$((a_fail + 1))
fail_sample="${fail_sample}${fail_sample:+; }HTTP ${_landing_code} $url"
fail_sample="${fail_sample}${fail_sample:+; }HTTP ${_landing_code} ${base}/intro/og-goa-shop.png"
else
a_soft=$((a_soft + 1))
soft_sample="${soft_sample}${soft_sample:+; }HTTP ${_landing_code} og-goa-shop.png (GOA asset)"
fi
done
fi
if _landing_probe "${base}/intro/qr-logo.png"; then
a_ok=$((a_ok + 1))
else
@ -1142,7 +1159,15 @@ if [ "${LOCAL_STACK:-1}" = "1" ] || [ -n "${BANK_PUBLIC:-}" ]; then
fail "bank /intro/demo-withdraw.json" "invalid taler://withdraw ($(tr '\n' ' ' <"$tmp/dw-val" | sed 's/[[:space:]]*$//'))"
fi
;;
405|501|404|502|503|000)
404|405|501)
# GOA bank landing mints demo-withdraw.json; stage TESTPAYSAN uses ATM/wallet guide only
if [ "${EXPECT_CURRENCY:-}" = "GOA" ] || [ "${LOCAL_STACK:-0}" = "1" ]; then
fail "landing bank demo-withdraw" "HTTP $dw_code (want 200)"
else
info "landing bank demo-withdraw" "HTTP $dw_code — skip (not a GOA demo-withdraw stack)"
fi
;;
502|503|000)
fail "landing bank demo-withdraw" "HTTP $dw_code (want 200)"
;;
*)