fix grpc test

This commit is contained in:
Asim Aslam 2020-07-19 15:54:33 +01:00 committed by Vasiliy Tolstov
parent 04cfa870dd
commit c69131b98c

View File

@ -10,6 +10,7 @@ import (
"github.com/micro/go-micro/v2/client" "github.com/micro/go-micro/v2/client"
gcli "github.com/micro/go-micro/v2/client/grpc" gcli "github.com/micro/go-micro/v2/client/grpc"
"github.com/micro/go-micro/v2/errors" "github.com/micro/go-micro/v2/errors"
pberr "github.com/micro/go-micro/v2/errors/proto"
rmemory "github.com/micro/go-micro/v2/registry/memory" rmemory "github.com/micro/go-micro/v2/registry/memory"
"github.com/micro/go-micro/v2/router" "github.com/micro/go-micro/v2/router"
"github.com/micro/go-micro/v2/server" "github.com/micro/go-micro/v2/server"
@ -201,7 +202,7 @@ func TestGRPCServer(t *testing.T) {
if !ok { if !ok {
t.Fatalf("invalid error received %#+v\n", err) t.Fatalf("invalid error received %#+v\n", err)
} }
verr, ok := st.Details()[0].(*errors.Error) verr, ok := st.Details()[0].(*pberr.Error)
if !ok { if !ok {
t.Fatalf("invalid error received %#+v\n", st.Details()[0]) t.Fatalf("invalid error received %#+v\n", st.Details()[0])
} }