| Index: server/auth/signing/context_test.go
|
| diff --git a/server/auth/signing/context_test.go b/server/auth/signing/context_test.go
|
| index 4a49d16f4d3a738df2cefd762c018b04bb6f72b6..d6cda774b5b84e545458e4df1fef10ebcd817c66 100644
|
| --- a/server/auth/signing/context_test.go
|
| +++ b/server/auth/signing/context_test.go
|
| @@ -6,16 +6,13 @@ package signing
|
|
|
| import (
|
| "errors"
|
| - "net/http"
|
| "net/http/httptest"
|
| "testing"
|
|
|
| - "github.com/julienschmidt/httprouter"
|
| "golang.org/x/net/context"
|
|
|
| - "github.com/luci/luci-go/server/middleware"
|
| -
|
| . "github.com/luci/luci-go/common/testing/assertions"
|
| + "github.com/luci/luci-go/server/router"
|
| . "github.com/smartystreets/goconvey/convey"
|
| )
|
|
|
| @@ -36,12 +33,9 @@ func TestContext(t *testing.T) {
|
| func TestHandlers(t *testing.T) {
|
|
|
| call := func(s Signer) (*PublicCertificates, error) {
|
| - r := httprouter.New()
|
| - InstallHandlers(r, func(h middleware.Handler) httprouter.Handle {
|
| - return func(w http.ResponseWriter, r *http.Request, p httprouter.Params) {
|
| - ctx := SetSigner(context.Background(), s)
|
| - h(ctx, w, r, p)
|
| - }
|
| + r := router.New()
|
| + InstallHandlers(r, []router.Handler{
|
| + func(c *router.Context) { c.Context = SetSigner(context.Background(), s) },
|
| })
|
| ts := httptest.NewServer(r)
|
| return FetchCertificates(context.Background(), ts.URL+"/auth/api/v1/server/certificates")
|
|
|