X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/72d7d41944006d1f48f570784dafe56b9812b0c8..451559bf80f31f57ac6937e79e4d37633b9eafa3:/lib/controller/server_test.go diff --git a/lib/controller/server_test.go b/lib/controller/server_test.go index 051f355716..4f3d4a5683 100644 --- a/lib/controller/server_test.go +++ b/lib/controller/server_test.go @@ -6,6 +6,7 @@ package controller import ( "context" + "net" "net/http" "os" "path/filepath" @@ -34,11 +35,14 @@ func integrationTestCluster() *arvados.Cluster { // provided by the integration-testing environment. func newServerFromIntegrationTestEnv(c *check.C) *httpserver.Server { log := ctxlog.TestLogger(c) - - handler := &Handler{Cluster: &arvados.Cluster{ - ClusterID: "zzzzz", - PostgreSQL: integrationTestCluster().PostgreSQL, - }} + ctx := ctxlog.Context(context.Background(), log) + handler := &Handler{ + Cluster: &arvados.Cluster{ + ClusterID: "zzzzz", + PostgreSQL: integrationTestCluster().PostgreSQL, + }, + BackgroundContext: ctx, + } handler.Cluster.TLS.Insecure = true handler.Cluster.Collections.BlobSigning = true handler.Cluster.Collections.BlobSigningKey = arvadostest.BlobSigningKey @@ -48,9 +52,8 @@ func newServerFromIntegrationTestEnv(c *check.C) *httpserver.Server { srv := &httpserver.Server{ Server: http.Server{ - Handler: httpserver.HandlerWithContext( - ctxlog.Context(context.Background(), log), - httpserver.AddRequestIDs(httpserver.LogRequests(handler))), + BaseContext: func(net.Listener) context.Context { return ctx }, + Handler: httpserver.AddRequestIDs(httpserver.LogRequests(handler)), }, Addr: ":", }