refactor: reorganize modules and add Linux build tooling
This commit is contained in:
30
module/ec/order/test/rpc/mgt_test.go
Normal file
30
module/ec/order/test/rpc/mgt_test.go
Normal file
@@ -0,0 +1,30 @@
|
||||
//go:build integration
|
||||
|
||||
package rpc
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
pb "bsm/full/module/ec/order/pb"
|
||||
)
|
||||
|
||||
func TestOrderListByStore(t *testing.T) {
|
||||
conn, ctx := GetCoon()
|
||||
client := pb.NewMgtClient(conn)
|
||||
|
||||
defer conn.Close()
|
||||
data := pb.OrderListByStoreRequest{
|
||||
PageNo: 1,
|
||||
PageSize: 5,
|
||||
}
|
||||
re, _ := json.Marshal(&data)
|
||||
fmt.Printf("发送的测试消息: %s\n", re)
|
||||
res, err := client.OrderListByStore(ctx, &data)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
s, _ := json.Marshal(res)
|
||||
fmt.Printf("返回的测试消息: %s", s)
|
||||
}
|
||||
Reference in New Issue
Block a user