package test import ( "app.yhyue.com/moapp/dataDeduplication/rpc/deduplication" "app.yhyue.com/moapp/dataDeduplication/rpc/deduplicationclient" "app.yhyue.com/moapp/dataDeduplication/rpc/internal/config" "context" "flag" "github.com/tal-tech/go-zero/core/conf" "github.com/tal-tech/go-zero/zrpc" "log" "testing" "time" ) var configFile = flag.String("f", "deduplication.yaml", "the config file") var c config.Config func init() { conf.MustLoad(*configFile, &c) } func Test_centerUserCenter(t *testing.T) { ctx, _ := context.WithTimeout(context.Background(), 5*time.Second) FileSystem := deduplicationclient.NewDeduplication(zrpc.MustNewClient(c.FileSystemConf)) req := &deduplication.Request{} req.InfoId="1aaaa,2,5555,888,222,abc" req.EntId="1" req.PersonId="0" req.IsEnt=true req.IsInsert = true res, err := FileSystem.DataDeduplication(ctx, req) log.Println("err ", err) log.Println("req ", res) }