hi-server/internal/logic/public/user/getDeviceListLogic_test.go
shanshanzhong 6b65ffb728
All checks were successful
Build docker and publish / build (20.15.1) (push) Successful in 7m4s
fix(user): 修复解绑设备接口的502错误和安全断言问题
修复不安全类型断言可能导致panic的问题,将Redis清理移出事务并添加超时控制
增加代理层超时配置和详细日志,提升接口稳定性
2025-12-01 21:24:11 -08:00

18 lines
362 B
Go

package user
import (
"context"
"testing"
"github.com/perfect-panel/server/internal/svc"
)
func TestGetDeviceList_MissingUserContext(t *testing.T) {
l := NewGetDeviceListLogic(context.Background(), &svc.ServiceContext{})
_, err := l.GetDeviceList()
if err == nil {
t.Fatalf("expected error when user context missing")
}
}