Skip to content

Commit 29aab27

Browse files
committed
In Go 1.22 finding name of function with reflection has changed. change tests to work with that.
1 parent 51c54f4 commit 29aab27

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

echo_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1572,7 +1572,7 @@ func TestEcho_OnAddRouteHandler(t *testing.T) {
15721572
})
15731573
}
15741574

1575-
e.GET("/static", NotFoundHandler)
1575+
e.GET("/static", dummyHandler)
15761576
e.Host("domain.site").GET("/static/*", dummyHandler, func(next HandlerFunc) HandlerFunc {
15771577
return func(c Context) error {
15781578
return next(c)
@@ -1582,7 +1582,7 @@ func TestEcho_OnAddRouteHandler(t *testing.T) {
15821582
assert.Len(t, added, 2)
15831583

15841584
assert.Equal(t, "", added[0].host)
1585-
assert.Equal(t, Route{Method: http.MethodGet, Path: "/static", Name: "github.com/labstack/echo/v4.glob..func1"}, added[0].route)
1585+
assert.Equal(t, Route{Method: http.MethodGet, Path: "/static", Name: "github.com/labstack/echo/v4.TestEcho_OnAddRouteHandler.func1"}, added[0].route)
15861586
assert.Len(t, added[0].middleware, 0)
15871587

15881588
assert.Equal(t, "domain.site", added[1].host)

0 commit comments

Comments
 (0)