monitoring: wallet-cli version in e2e
This commit is contained in:
parent
b9d37f6729
commit
acac6d0ed3
1 changed files with 35 additions and 1 deletions
|
|
@ -317,7 +317,41 @@ WALLET_CLI=$(find_wallet_cli) || {
|
|||
blocker "prereq" "taler-wallet-cli not found (set WALLET_CLI=)"
|
||||
exit 1
|
||||
}
|
||||
ok "wallet-cli ($WALLET_CLI)"
|
||||
# Implementation version (--version) + wallet-core API ranges (version command)
|
||||
WALLET_IMPL_VER=$(
|
||||
node "$WALLET_CLI" --version 2>/dev/null | head -1 | tr -d '\r' || true
|
||||
)
|
||||
WALLET_CORE_VER=$(
|
||||
_wver_db=$(mktemp "${TMPDIR:-/tmp}/wver.XXXXXX.sqlite3" 2>/dev/null || echo "${TMPDIR:-/tmp}/wver-$$.sqlite3")
|
||||
node "$WALLET_CLI" --wallet-db="$_wver_db" --no-throttle --skip-defaults version 2>/dev/null \
|
||||
| python3 -c '
|
||||
import json,re,sys
|
||||
raw=sys.stdin.read()
|
||||
d=None
|
||||
for m in re.finditer(r"\{", raw):
|
||||
try:
|
||||
d=json.loads(raw[m.start():])
|
||||
if isinstance(d, dict) and "version" in d:
|
||||
break
|
||||
except Exception:
|
||||
d=None
|
||||
if not isinstance(d, dict):
|
||||
sys.exit(0)
|
||||
parts=[]
|
||||
# wallet-core libversion + protocol ranges used against exchange/merchant/bank
|
||||
for k in ("version","implementationSemver","exchange","merchant","bank","bankIntegrationApiRange","corebankApiRange"):
|
||||
if k in d and d[k] is not None:
|
||||
parts.append("%s=%s" % (k, d[k]))
|
||||
print(" ".join(parts))
|
||||
' 2>/dev/null || true
|
||||
rm -f "$_wver_db" "$_wver_db"-* 2>/dev/null || true
|
||||
)
|
||||
ok "wallet-cli" "${WALLET_IMPL_VER:-?} · ${WALLET_CLI}"
|
||||
if [ -n "${WALLET_CORE_VER:-}" ]; then
|
||||
info "wallet-core" "$WALLET_CORE_VER"
|
||||
else
|
||||
info "wallet-core" "version details unavailable (impl ${WALLET_IMPL_VER:-?})"
|
||||
fi
|
||||
info "e2e mode" "$([ "$E2E_REMOTE" = "1" ] && echo "remote/public domain (no SSH)" || echo "local koopa stack")"
|
||||
info "currency" "$CUR"
|
||||
info "ATM withdraw ladder" "$WITHDRAW_LIST (credit $CREDIT_AMT)"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue