diff --git a/server/cells_test.go b/server/cells_test.go index 2f6060bf14..f125c30ad7 100644 --- a/server/cells_test.go +++ b/server/cells_test.go @@ -217,7 +217,10 @@ func Test_Service_DashboardCells(t *testing.T) { ctx := context.Background() params := httprouter.Params{} for k, v := range test.ctxParams { - params = append(params, httprouter.Param{k, v}) + params = append(params, httprouter.Param{ + Key: k, + Value: v, + }) } ctx = httprouter.WithParams(ctx, params) diff --git a/server/kapacitors_test.go b/server/kapacitors_test.go index d746f7b5c9..81bdbee681 100644 --- a/server/kapacitors_test.go +++ b/server/kapacitors_test.go @@ -213,12 +213,12 @@ func Test_KapacitorRulesGet(t *testing.T) { bg := context.Background() params := httprouter.Params{ { - "id", - "1", + Key: "id", + Value: "1", }, { - "kid", - "1", + Key: "kid", + Value: "1", }, } ctx := httprouter.WithParams(bg, params) @@ -244,8 +244,8 @@ func Test_KapacitorRulesGet(t *testing.T) { actual := make([]chronograf.AlertRule, len(frame.Rules)) - for idx, _ := range frame.Rules { - actual[idx] = frame.Rules[idx].AlertRule + for i := range frame.Rules { + actual[i] = frame.Rules[i].AlertRule } if resp.StatusCode != http.StatusOK { diff --git a/server/mux.go b/server/mux.go index 1543eb2eb9..dabf153e46 100644 --- a/server/mux.go +++ b/server/mux.go @@ -202,7 +202,7 @@ func NewMux(opts MuxOpts, service Service) http.Handler { // Encapsulate the router with OAuth2 var auth http.Handler auth, allRoutes.AuthRoutes = AuthAPI(opts, router) - allRoutes.LogoutLink = "/oauth/logout" + allRoutes.LogoutLink = path.Join(opts.Basepath, "/oauth/logout") // Create middleware that redirects to the appropriate provider logout router.GET(allRoutes.LogoutLink, Logout("/", basepath, allRoutes.AuthRoutes))