From 902848c621b9cd84c8cc9bf3564a71be54f721e2 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Fri, 26 Mar 2021 17:49:49 +0300 Subject: [PATCH] service: add simple test Signed-off-by: Vasiliy Tolstov --- service/service_test.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 service/service_test.go diff --git a/service/service_test.go b/service/service_test.go new file mode 100644 index 0000000..bd3a863 --- /dev/null +++ b/service/service_test.go @@ -0,0 +1,22 @@ +package service + +import ( + "testing" + + httpcli "github.com/unistack-org/micro-client-http/v3" + httpsrv "github.com/unistack-org/micro-server-http/v3" + "github.com/unistack-org/micro/v3" + "github.com/unistack-org/micro/v3/server" +) + +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) + } + +}