update all deps to latest versions
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
@@ -7,8 +7,8 @@ import (
|
||||
bmemory "github.com/unistack-org/micro-broker-memory/v3"
|
||||
gclient "github.com/unistack-org/micro-client-grpc/v3"
|
||||
protocodec "github.com/unistack-org/micro-codec-proto/v3"
|
||||
rmemory "github.com/unistack-org/micro-registry-memory/v3"
|
||||
regRouter "github.com/unistack-org/micro-router-registry/v3"
|
||||
rmemory "github.com/unistack-org/micro-register-memory/v3"
|
||||
regRouter "github.com/unistack-org/micro-router-register/v3"
|
||||
gserver "github.com/unistack-org/micro-server-grpc/v3"
|
||||
pb "github.com/unistack-org/micro-tests/server/grpc/proto"
|
||||
"github.com/unistack-org/micro/v3/broker"
|
||||
@@ -36,11 +36,11 @@ func (g *testServer) Call(ctx context.Context, req *pb.Request, rsp *pb.Response
|
||||
func TestGRPCServer(t *testing.T) {
|
||||
var err error
|
||||
|
||||
r := rmemory.NewRegistry()
|
||||
b := bmemory.NewBroker(broker.Registry(r))
|
||||
s := gserver.NewServer(server.Codec("application/grpc+proto", protocodec.NewCodec()), server.Address(":12345"), server.Registry(r), server.Name("helloworld"), gserver.Reflection(true))
|
||||
r := rmemory.NewRegister()
|
||||
b := bmemory.NewBroker(broker.Register(r))
|
||||
s := gserver.NewServer(server.Codec("application/grpc+proto", protocodec.NewCodec()), server.Address(":12345"), server.Register(r), server.Name("helloworld"), gserver.Reflection(true))
|
||||
// create router
|
||||
rtr := regRouter.NewRouter(router.Registry(r))
|
||||
rtr := regRouter.NewRouter(router.Register(r))
|
||||
|
||||
h := &testServer{}
|
||||
err = pb.RegisterTestHandler(s, h)
|
||||
@@ -63,7 +63,7 @@ func TestGRPCServer(t *testing.T) {
|
||||
}()
|
||||
|
||||
// create client
|
||||
c := gclient.NewClient(client.Codec("application/grpc+proto", protocodec.NewCodec()), client.Router(rtr), client.Registry(r), client.Broker(b))
|
||||
c := gclient.NewClient(client.Codec("application/grpc+proto", protocodec.NewCodec()), client.Router(rtr), client.Register(r), client.Broker(b))
|
||||
|
||||
testMethods := []string{
|
||||
"Test.Call",
|
||||
|
@@ -7,17 +7,17 @@ import (
|
||||
"net/http"
|
||||
"testing"
|
||||
|
||||
memory "github.com/unistack-org/micro-registry-memory/v3"
|
||||
memory "github.com/unistack-org/micro-register-memory/v3"
|
||||
httpsrv "github.com/unistack-org/micro-server-http/v3"
|
||||
"github.com/unistack-org/micro/v3/server"
|
||||
)
|
||||
|
||||
func TestHTTPServer(t *testing.T) {
|
||||
reg := memory.NewRegistry()
|
||||
reg := memory.NewRegister()
|
||||
ctx := context.Background()
|
||||
|
||||
// create server
|
||||
srv := httpsrv.NewServer(server.Registry(reg))
|
||||
srv := httpsrv.NewServer(server.Register(reg))
|
||||
|
||||
// create server mux
|
||||
mux := http.NewServeMux()
|
||||
@@ -39,7 +39,7 @@ func TestHTTPServer(t *testing.T) {
|
||||
}
|
||||
|
||||
// lookup server
|
||||
service, err := reg.GetService(ctx, server.DefaultName)
|
||||
service, err := reg.LookupService(ctx, server.DefaultName)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@ import (
|
||||
"time"
|
||||
|
||||
bmemory "github.com/unistack-org/micro-broker-memory/v3"
|
||||
rmemory "github.com/unistack-org/micro-registry-memory/v3"
|
||||
rmemory "github.com/unistack-org/micro-register-memory/v3"
|
||||
tcp "github.com/unistack-org/micro-server-tcp/v3"
|
||||
"github.com/unistack-org/micro/v3/broker"
|
||||
"github.com/unistack-org/micro/v3/logger"
|
||||
@@ -24,17 +24,17 @@ func TestTCPServer(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
|
||||
logger.DefaultLogger = logger.NewLogger(logger.WithLevel(logger.TraceLevel))
|
||||
reg := rmemory.NewRegistry()
|
||||
reg := rmemory.NewRegister()
|
||||
if err := reg.Init(); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
brk := bmemory.NewBroker(broker.Registry(reg))
|
||||
brk := bmemory.NewBroker(broker.Register(reg))
|
||||
if err := brk.Init(); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
// create server
|
||||
srv := tcp.NewServer(server.Registry(reg), server.Broker(brk), server.Address("127.0.0.1:65000"))
|
||||
srv := tcp.NewServer(server.Register(reg), server.Broker(brk), server.Address("127.0.0.1:65000"))
|
||||
|
||||
// create handler
|
||||
h := &testHandler{done: make(chan struct{})}
|
||||
@@ -54,7 +54,7 @@ func TestTCPServer(t *testing.T) {
|
||||
}
|
||||
|
||||
// lookup server
|
||||
service, err := reg.GetService(ctx, server.DefaultName)
|
||||
service, err := reg.LookupService(ctx, server.DefaultName)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user