Vasiliy Tolstov
06136312bb
* regen files with never protoc * rewrite import path Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
26 lines
482 B
Go
26 lines
482 B
Go
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("IN_TRAVIS_CI")) == 0 {
|
|
t.Logf("TestRouterStartStop STOPPED")
|
|
}
|
|
}
|