From 9d212000496d2d6495ecc9f68233256e5ecd6b23 Mon Sep 17 00:00:00 2001 From: Ayaan Zaidi Date: Sun, 26 Apr 2026 11:20:39 +0530 Subject: [PATCH] test(e2e): cover npm onboarding runtime deps --- scripts/e2e/npm-telegram-live-docker.sh | 40 +++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/scripts/e2e/npm-telegram-live-docker.sh b/scripts/e2e/npm-telegram-live-docker.sh index 4b52d5baba5..58e662cb13f 100755 --- a/scripts/e2e/npm-telegram-live-docker.sh +++ b/scripts/e2e/npm-telegram-live-docker.sh @@ -153,10 +153,50 @@ export NPM_CONFIG_PREFIX="/npm-global" export PATH="$NPM_CONFIG_PREFIX/bin:$PATH" export OPENCLAW_NPM_TELEGRAM_REPO_ROOT="/app" +dump_hotpath_logs() { + local status="$1" + echo "installed npm onboarding recovery hot path failed with exit code $status" >&2 + for file in \ + /tmp/openclaw-npm-telegram-onboard.json \ + /tmp/openclaw-npm-telegram-channel-add.log \ + /tmp/openclaw-npm-telegram-doctor-fix.log \ + /tmp/openclaw-npm-telegram-doctor-check.log; do + if [ -f "$file" ]; then + echo "--- $file ---" >&2 + sed -n '1,220p' "$file" >&2 || true + fi + done +} +trap 'status=$?; dump_hotpath_logs "$status"; exit "$status"' ERR + command -v openclaw openclaw --version +echo "Running installed npm onboarding recovery hot path..." +OPENAI_API_KEY="${OPENAI_API_KEY:-sk-openclaw-npm-telegram-hotpath}" openclaw onboard --non-interactive --accept-risk \ + --mode local \ + --auth-choice openai-api-key \ + --secret-input-mode ref \ + --gateway-port 18789 \ + --gateway-bind loopback \ + --skip-daemon \ + --skip-ui \ + --skip-skills \ + --skip-health \ + --json >/tmp/openclaw-npm-telegram-onboard.json /tmp/openclaw-npm-telegram-channel-add.log 2>&1 /tmp/openclaw-npm-telegram-doctor-fix.log 2>&1 /tmp/openclaw-npm-telegram-doctor-check.log 2>&1