remove vpath resolver

This commit is contained in:
Asim Aslam
2020-10-17 15:00:40 +01:00
parent d3b37f14cf
commit f2728a7fee
3 changed files with 4 additions and 104 deletions

View File

@@ -8,7 +8,7 @@ import (
"github.com/micro/go-micro/v3/api/handler"
"github.com/micro/go-micro/v3/api/resolver"
"github.com/micro/go-micro/v3/api/resolver/vpath"
rpath "github.com/micro/go-micro/v3/api/resolver/path"
"github.com/micro/go-micro/v3/api/router"
regRouter "github.com/micro/go-micro/v3/api/router/registry"
"github.com/micro/go-micro/v3/registry"
@@ -57,7 +57,7 @@ func testHttp(t *testing.T, path, service, ns string) {
rt := regRouter.NewRouter(
router.WithHandler("http"),
router.WithRegistry(r),
router.WithResolver(vpath.NewResolver(
router.WithResolver(rpath.NewResolver(
resolver.WithServicePrefix(ns),
)),
)
@@ -92,31 +92,6 @@ func TestHttpHandler(t *testing.T) {
"go.micro.api.test",
"go.micro.api",
},
{
"/v1/foo",
"go.micro.api.v1.foo",
"go.micro.api",
},
{
"/v1/foo/bar",
"go.micro.api.v1.foo",
"go.micro.api",
},
{
"/v2/baz",
"go.micro.api.v2.baz",
"go.micro.api",
},
{
"/v2/baz/bar",
"go.micro.api.v2.baz",
"go.micro.api",
},
{
"/v2/baz/bar",
"v2.baz",
"",
},
}
for _, d := range testData {