|
@@ -1,13 +1,11 @@
|
|
|
-package test
|
|
|
+package service
|
|
|
|
|
|
import (
|
|
|
"context"
|
|
|
- "github.com/zeromicro/go-zero/zrpc"
|
|
|
"log"
|
|
|
"testing"
|
|
|
"time"
|
|
|
"userCenter/rpc/pb"
|
|
|
- usercenterclient "userCenter/rpc/usercenter"
|
|
|
)
|
|
|
|
|
|
var (
|
|
@@ -17,14 +15,15 @@ var (
|
|
|
// 菜单模式选择
|
|
|
// go test -v -run Test_MenuMode
|
|
|
func Test_MenuMode(t *testing.T) {
|
|
|
- FileSystem := usercenterclient.NewUserCenter(zrpc.MustNewClient(c.FileSystemConf))
|
|
|
+ FileSystem := AutoInit()
|
|
|
+ AutoInit()
|
|
|
req := &pb.WorkDesktopComprehensiveReq{
|
|
|
UserId: "61e7820581197c2e50af18df",
|
|
|
AppId: "10000",
|
|
|
Platform: "PC",
|
|
|
Phone: "",
|
|
|
ActionMode: "menuMode",
|
|
|
- MenuMode: "all",
|
|
|
+ MenuMode: "usable",
|
|
|
MenuIds: "",
|
|
|
}
|
|
|
res, err := FileSystem.WorkDesktopComprehensive(ctx, req)
|
|
@@ -35,7 +34,7 @@ func Test_MenuMode(t *testing.T) {
|
|
|
// 常用功能更新
|
|
|
// go test -v -run Test_CommonlyRenew
|
|
|
func Test_CommonlyRenew(t *testing.T) {
|
|
|
- FileSystem := usercenterclient.NewUserCenter(zrpc.MustNewClient(c.FileSystemConf))
|
|
|
+ FileSystem := AutoInit()
|
|
|
req := &pb.WorkDesktopComprehensiveReq{
|
|
|
UserId: "61e7820581197c2e50af18df",
|
|
|
AppId: "10000",
|
|
@@ -53,7 +52,7 @@ func Test_CommonlyRenew(t *testing.T) {
|
|
|
// 常用功能列表
|
|
|
// go test -v -run Test_CommonlyList
|
|
|
func Test_CommonlyList(t *testing.T) {
|
|
|
- FileSystem := usercenterclient.NewUserCenter(zrpc.MustNewClient(c.FileSystemConf))
|
|
|
+ FileSystem := AutoInit()
|
|
|
req := &pb.WorkDesktopComprehensiveReq{
|
|
|
UserId: "61e7820581197c2e50af18df",
|
|
|
AppId: "10000",
|
|
@@ -71,7 +70,7 @@ func Test_CommonlyList(t *testing.T) {
|
|
|
//工作桌面菜单树
|
|
|
//go test -run=Test_WorkDesktopMenuTree
|
|
|
func Test_WorkDesktopMenuTree(t *testing.T) {
|
|
|
- FileSystem := usercenterclient.NewUserCenter(zrpc.MustNewClient(c.FileSystemConf))
|
|
|
+ FileSystem := AutoInit()
|
|
|
req := &pb.WorkDesktopMenuInfoReq{
|
|
|
UserId: "61e7820581197c2e50af18df",
|
|
|
AppId: "10000",
|