| Index: common/testing/prpctest/server.go
|
| diff --git a/common/testing/prpctest/server.go b/common/testing/prpctest/server.go
|
| index 670482440596f82ba99e157f6af35790aee079a5..63cc4358505c6d251b47d630fec0e281f98a219d 100644
|
| --- a/common/testing/prpctest/server.go
|
| +++ b/common/testing/prpctest/server.go
|
| @@ -12,11 +12,10 @@ import (
|
| "net/http/httptest"
|
| "net/url"
|
|
|
| - "github.com/julienschmidt/httprouter"
|
| prpcCommon "github.com/luci/luci-go/common/prpc"
|
| "github.com/luci/luci-go/server/auth"
|
| - "github.com/luci/luci-go/server/middleware"
|
| "github.com/luci/luci-go/server/prpc"
|
| + "github.com/luci/luci-go/server/router"
|
| "golang.org/x/net/context"
|
| )
|
|
|
| @@ -25,8 +24,8 @@ type Server struct {
|
| prpc.Server
|
|
|
| // Base is the base middleware generator factory. It is handed the Context
|
| - // passed to Start. If nil, middleware.TestingBase will be used.
|
| - Base func(context.Context) middleware.Base
|
| + // passed to Start. If Base is nil, middleware.TestingBase will be used.
|
| + Base func(c context.Context) router.Base
|
|
|
| // HTTP is the active HTTP test server. It will be valid when the Server is
|
| // running.
|
| @@ -42,11 +41,11 @@ func (s *Server) Start(c context.Context) {
|
| s.Authenticator = auth.Authenticator{}
|
| mwb := s.Base
|
| if mwb == nil {
|
| - mwb = middleware.TestingBase
|
| + mwb = router.TestingBase
|
| }
|
|
|
| - r := httprouter.New()
|
| - s.InstallHandlers(r, mwb(c))
|
| + r := router.New()
|
| + s.InstallHandlers(r, mwb(c)())
|
| s.HTTP = httptest.NewServer(r)
|
| }
|
|
|
|
|