2021-03-26 17:49:49 +03:00
|
|
|
package service
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2021-10-27 01:24:35 +03:00
|
|
|
httpcli "go.unistack.org/micro-client-http/v3"
|
|
|
|
httpsrv "go.unistack.org/micro-server-http/v3"
|
|
|
|
"go.unistack.org/micro/v3"
|
|
|
|
"go.unistack.org/micro/v3/server"
|
2021-03-26 17:49:49 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestHTTPService(t *testing.T) {
|
|
|
|
svc := micro.NewService(
|
|
|
|
micro.Server(httpsrv.NewServer(server.Address("127.0.0.1:0"))),
|
|
|
|
micro.Client(httpcli.NewClient()),
|
|
|
|
)
|
|
|
|
|
|
|
|
if err := svc.Init(); err != nil {
|
|
|
|
t.Fatal(err)
|
|
|
|
}
|
|
|
|
}
|