X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/be93d1d225ca8d4bccf08d9203d456b5d32dc07b..22f9af1104fa45e95ef3cd8b5a770fc0b9ed0fd3:/lib/controller/auth_test.go diff --git a/lib/controller/auth_test.go b/lib/controller/auth_test.go index 69458655ba..5d477a7664 100644 --- a/lib/controller/auth_test.go +++ b/lib/controller/auth_test.go @@ -8,6 +8,7 @@ import ( "context" "encoding/json" "fmt" + "net" "net/http" "net/http/httptest" "os" @@ -97,11 +98,12 @@ func (s *AuthSuite) SetUpTest(c *check.C) { cluster.Login.OpenIDConnect.AcceptAccessToken = true cluster.Login.OpenIDConnect.AcceptAccessTokenScope = "" - s.testHandler = &Handler{Cluster: cluster} + s.testHandler = &Handler{Cluster: cluster, BackgroundContext: ctxlog.Context(context.Background(), s.log)} s.testServer = newServerFromIntegrationTestEnv(c) - s.testServer.Server.Handler = httpserver.HandlerWithContext( - ctxlog.Context(context.Background(), s.log), - httpserver.AddRequestIDs(httpserver.LogRequests(s.testHandler))) + s.testServer.Server.BaseContext = func(net.Listener) context.Context { + return ctxlog.Context(context.Background(), s.log) + } + s.testServer.Server.Handler = httpserver.AddRequestIDs(httpserver.LogRequests(s.testHandler)) c.Assert(s.testServer.Start(), check.IsNil) }