fix: 冒烟测试登录适配账套模式(entity_id=1)

This commit is contained in:
Hermes CI Fix
2026-08-28 07:21:15 +08:00
parent 1a6ea8afae
commit b9c624fd7e
+1 -1
View File
@@ -80,7 +80,7 @@ else
fi fi
TOKEN=$(curl -s -X POST http://127.0.0.1:8010/api/cma/auth/login \ TOKEN=$(curl -s -X POST http://127.0.0.1:8010/api/cma/auth/login \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d '{"username":"admin","password":"admin123"}' | python3 -c "import sys,json; print(json.load(sys.stdin).get('token',''))" 2>/dev/null) -d '{"username":"admin","password":"admin123","entity_id":1}' | python3 -c "import sys,json; print(json.load(sys.stdin).get('token',''))" 2>/dev/null)
if [ -n "$TOKEN" ]; then if [ -n "$TOKEN" ]; then
echo " ✅ 登录API通过" echo " ✅ 登录API通过"
if curl -sf -H "Authorization: Bearer $TOKEN" http://127.0.0.1:8010/api/cma/kpis > /dev/null 2>&1; then if curl -sf -H "Authorization: Bearer $TOKEN" http://127.0.0.1:8010/api/cma/kpis > /dev/null 2>&1; then