test: add more tests (#1149)

This commit is contained in:
Kevin Wan
2021-10-19 23:48:25 +08:00
committed by GitHub
parent eab77e21dd
commit a40fa405e4
2 changed files with 55 additions and 13 deletions

View File

@@ -4,7 +4,6 @@ import (
"log"
"time"
"github.com/tal-tech/go-zero/core/discov"
"github.com/tal-tech/go-zero/zrpc/internal"
"github.com/tal-tech/go-zero/zrpc/internal/auth"
"google.golang.org/grpc"
@@ -79,18 +78,6 @@ func NewClient(c RpcClientConf, options ...ClientOption) (Client, error) {
}, nil
}
// NewClientNoAuth returns a Client without authentication.
func NewClientNoAuth(c discov.EtcdConf, opts ...ClientOption) (Client, error) {
client, err := internal.NewClient(internal.BuildDiscovTarget(c.Hosts, c.Key), opts...)
if err != nil {
return nil, err
}
return &RpcClient{
client: client,
}, nil
}
// NewClientWithTarget returns a Client with connecting to given target.
func NewClientWithTarget(target string, opts ...ClientOption) (Client, error) {
return internal.NewClient(target, opts...)