micro-router-register/registry_test.go
Vasiliy Tolstov 7e3e1152a5 update for latest micro
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-01-29 15:08:17 +03:00

28 lines
505 B
Go

// +build ignore
package register
import (
"os"
"testing"
"github.com/unistack-org/micro/v3/register/memory"
"github.com/unistack-org/micro/v3/router"
)
func routerTestSetup() router.Router {
r := memory.NewRegister()
return NewRouter(router.Register(r))
}
func TestRouterClose(t *testing.T) {
r := routerTestSetup()
if err := r.Close(); err != nil {
t.Errorf("failed to stop router: %v", err)
}
if len(os.Getenv("INTEGRATION_TESTS")) == 0 {
t.Logf("TestRouterStartStop STOPPED")
}
}