From 69c5e06f0f557b5f0278513384c902932a298254 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lal?= Date: Fri, 29 Dec 2023 11:23:32 +0100 Subject: [PATCH] Fix integration test route builder for go-restful > 3.8 It would produce empty paths without leading slash --- test/integration/testutil/testutil.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/integration/testutil/testutil.go b/test/integration/testutil/testutil.go index 344b8618e..cd099f398 100644 --- a/test/integration/testutil/testutil.go +++ b/test/integration/testutil/testutil.go @@ -131,12 +131,12 @@ func buildRouteForType(ws *restful.WebService, pkg, name string) []*restful.Rout } routes := []*restful.RouteBuilder{ - ws.GET(fmt.Sprintf("test/%s/%s", pkg, strings.ToLower(name))). + ws.GET(fmt.Sprintf("/test/%s/%s", pkg, strings.ToLower(name))). Operation(fmt.Sprintf("get-%s.%s", pkg, name)). Produces("application/json"). To(func(*restful.Request, *restful.Response) {}). Writes(&namer), - ws.POST(fmt.Sprintf("test/%s", pkg)). + ws.POST(fmt.Sprintf("/test/%s", pkg)). Operation(fmt.Sprintf("create-%s.%s", pkg, name)). Produces("application/json"). To(func(*restful.Request, *restful.Response) {}).