增加单测和测试文件
This commit is contained in:
@ -10,12 +10,11 @@ package rpc
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestInitRPC(t *testing.T) {
|
||||
proxyServiceInfo := &Service{
|
||||
/*proxyServiceInfo := &Service{
|
||||
Flag: "goproxy",
|
||||
Domain: "https://goproxy.cn/",
|
||||
CodeField: "-",
|
||||
@ -36,10 +35,8 @@ func TestInitRPC(t *testing.T) {
|
||||
},
|
||||
},
|
||||
ApiRetry: ApiRetry{},
|
||||
}
|
||||
if err := InitRPC(map[string]*Service{
|
||||
"goproxy": proxyServiceInfo,
|
||||
}, nil); nil != err {
|
||||
}*/
|
||||
if err := InitRPCFromCfgDir("/Users/zhangdeman/project/go-project/rpc/etc", nil); nil != err {
|
||||
panic(err.Error())
|
||||
}
|
||||
var result map[string]interface{}
|
||||
|
Reference in New Issue
Block a user