X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/9ed0a21813117caf5c6bae73c09a0d725564743b..fb429aa6a8dd1d28d08038abd8de8b9206a1d51e:/lib/controller/server_test.go diff --git a/lib/controller/server_test.go b/lib/controller/server_test.go index 54f8bdbebf..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,12 +35,16 @@ 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 handler.Cluster.Collections.BlobSigningTTL = arvados.Duration(time.Hour * 24 * 14) arvadostest.SetServiceURL(&handler.Cluster.Services.RailsAPI, "https://"+os.Getenv("ARVADOS_TEST_API_HOST")) @@ -47,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: ":", }