mirror of
https://github.com/labstack/echo.git
synced 2024-11-28 08:38:39 +02:00
In Go 1.22 finding name of function with reflection has changed. change tests to work with that.
This commit is contained in:
parent
51c54f4734
commit
29aab274b3
@ -1572,7 +1572,7 @@ func TestEcho_OnAddRouteHandler(t *testing.T) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
e.GET("/static", NotFoundHandler)
|
e.GET("/static", dummyHandler)
|
||||||
e.Host("domain.site").GET("/static/*", dummyHandler, func(next HandlerFunc) HandlerFunc {
|
e.Host("domain.site").GET("/static/*", dummyHandler, func(next HandlerFunc) HandlerFunc {
|
||||||
return func(c Context) error {
|
return func(c Context) error {
|
||||||
return next(c)
|
return next(c)
|
||||||
@ -1582,7 +1582,7 @@ func TestEcho_OnAddRouteHandler(t *testing.T) {
|
|||||||
assert.Len(t, added, 2)
|
assert.Len(t, added, 2)
|
||||||
|
|
||||||
assert.Equal(t, "", added[0].host)
|
assert.Equal(t, "", added[0].host)
|
||||||
assert.Equal(t, Route{Method: http.MethodGet, Path: "/static", Name: "github.com/labstack/echo/v4.glob..func1"}, added[0].route)
|
assert.Equal(t, Route{Method: http.MethodGet, Path: "/static", Name: "github.com/labstack/echo/v4.TestEcho_OnAddRouteHandler.func1"}, added[0].route)
|
||||||
assert.Len(t, added[0].middleware, 0)
|
assert.Len(t, added[0].middleware, 0)
|
||||||
|
|
||||||
assert.Equal(t, "domain.site", added[1].host)
|
assert.Equal(t, "domain.site", added[1].host)
|
||||||
|
Loading…
Reference in New Issue
Block a user