fix: remove deprecated dependencies (#1837)
* fix: remove deprecated dependencies * backup * fix test error
This commit is contained in:
@@ -14,6 +14,7 @@ import (
|
||||
"github.com/zeromicro/go-zero/zrpc/internal/mock"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/grpc/test/bufconn"
|
||||
)
|
||||
@@ -103,14 +104,15 @@ func TestDepositServer_Deposit(t *testing.T) {
|
||||
Token: "bar",
|
||||
Timeout: 1000,
|
||||
},
|
||||
WithDialOption(grpc.WithInsecure()),
|
||||
WithDialOption(grpc.WithTransportCredentials(insecure.NewCredentials())),
|
||||
WithDialOption(grpc.WithContextDialer(dialer())),
|
||||
WithUnaryClientInterceptor(func(ctx context.Context, method string, req, reply interface{},
|
||||
cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error {
|
||||
return invoker(ctx, method, req, reply, cc, opts...)
|
||||
}),
|
||||
)
|
||||
targetClient, err := NewClientWithTarget("foo", WithDialOption(grpc.WithInsecure()),
|
||||
targetClient, err := NewClientWithTarget("foo",
|
||||
WithDialOption(grpc.WithTransportCredentials(insecure.NewCredentials())),
|
||||
WithDialOption(grpc.WithContextDialer(dialer())), WithUnaryClientInterceptor(
|
||||
func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn,
|
||||
invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error {
|
||||
@@ -162,7 +164,7 @@ func TestNewClientWithError(t *testing.T) {
|
||||
Token: "bar",
|
||||
Timeout: 1000,
|
||||
},
|
||||
WithDialOption(grpc.WithInsecure()),
|
||||
WithDialOption(grpc.WithTransportCredentials(insecure.NewCredentials())),
|
||||
WithDialOption(grpc.WithContextDialer(dialer())),
|
||||
WithUnaryClientInterceptor(func(ctx context.Context, method string, req, reply interface{},
|
||||
cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error {
|
||||
@@ -181,7 +183,7 @@ func TestNewClientWithError(t *testing.T) {
|
||||
Token: "bar",
|
||||
Timeout: 1,
|
||||
},
|
||||
WithDialOption(grpc.WithInsecure()),
|
||||
WithDialOption(grpc.WithTransportCredentials(insecure.NewCredentials())),
|
||||
WithDialOption(grpc.WithContextDialer(dialer())),
|
||||
WithUnaryClientInterceptor(func(ctx context.Context, method string, req, reply interface{},
|
||||
cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error {
|
||||
|
||||
Reference in New Issue
Block a user