micro/router/registry/registry_test.go
Vasiliy Tolstov 0f4b1435d9
move implementations to external repos (#17)
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-08-25 13:44:41 +03:00

28 lines
505 B
Go

// +build ignore
package registry
import (
"os"
"testing"
"github.com/unistack-org/micro/v3/registry/memory"
"github.com/unistack-org/micro/v3/router"
)
func routerTestSetup() router.Router {
r := memory.NewRegistry()
return NewRouter(router.Registry(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")
}
}