diff --git a/cmd/soundtouch-service/router_test.go b/cmd/soundtouch-service/router_test.go index 1d6f82bd..be672b5d 100644 --- a/cmd/soundtouch-service/router_test.go +++ b/cmd/soundtouch-service/router_test.go @@ -39,11 +39,8 @@ func TestPrintRoutes(t *testing.T) { // Now we might have "soundtouch-service.setupRouter.func1" // or "command-line-arguments.setupRouter.func1" // or "main.setupRouter.func1" - // Let's remove the first part if it's a known varying package name - if idx := strings.Index(handlerName, "setupRouter"); idx != -1 { - handlerName = handlerName[idx:] - } - // In case it's not setupRouter but still has a package prefix + // Remove the leading package/binary-name segment(s), whatever form + // they take. for { dotIdx := strings.Index(handlerName, ".") if dotIdx == -1 { diff --git a/cmd/soundtouch-service/testdata/router_routes.txt b/cmd/soundtouch-service/testdata/router_routes.txt index 8c3b2ce4..57306b7c 100644 --- a/cmd/soundtouch-service/testdata/router_routes.txt +++ b/cmd/soundtouch-service/testdata/router_routes.txt @@ -169,7 +169,7 @@ GET /streaming/sourceproviders handlers.( GET /updates/soundtouch handlers.(*Server).HandleMargeSoftwareUpdate-fm GET /v1/auth handlers.(*Server).HandleSpeakerAuth-fm GET /v1/blacklist/{deviceId} setupRouter -GET /web/* setupRouter.(*Server).HandleWeb +GET /web/* handlers.(*Server).HandleWeb HEAD /core02/svc-bmx-adapter-siriusxm-everest-eco1/prod/live-adapter handlers.(*Server).HandleSiriusXMLiveAdapter-fm HEAD /core02/svc-bmx-adapter-siriusxm-everest-eco1/prod/live-adapter/* handlers.(*Server).HandleSiriusXMLiveAdapterSubpath-fm OPTIONS /core02/svc-bmx-adapter-siriusxm-everest-eco1/prod/live-adapter handlers.(*Server).HandleSiriusXMLiveAdapter-fm