fix(e2e): read auth_token not token from test-token response

This commit is contained in:
Hongming Wang 2026-04-16 06:11:32 -07:00
parent b1def4a933
commit edd17cecaa

View File

@ -64,7 +64,7 @@ ECHO_ID=$(echo "$R" | python3 -c "import sys,json; print(json.load(sys.stdin)['i
# Debug: show what the test-token endpoint returns
TEST_TOKEN_RAW=$(curl -s "$BASE/admin/workspaces/$ECHO_ID/test-token")
echo " test-token response: $TEST_TOKEN_RAW"
ADMIN_TOKEN=$(echo "$TEST_TOKEN_RAW" | python3 -c "import sys,json; print(json.load(sys.stdin).get('token',''))" 2>/dev/null || echo "")
ADMIN_TOKEN=$(echo "$TEST_TOKEN_RAW" | python3 -c "import sys,json; print(json.load(sys.stdin).get('auth_token',''))" 2>/dev/null || echo "")
if [ -n "$ADMIN_TOKEN" ]; then
echo " (acquired admin token: ${ADMIN_TOKEN:0:8}...)"
else