15107: Merge branch 'master' into 15107-rails-bad-redirect
[arvados.git] / lib / controller / server_test.go
index a398af97b21884ae896f675b1c2ab00a59ae55d4..edc5fd117de33f4b96dd3fa53f815ab382b13bf1 100644 (file)
@@ -5,6 +5,7 @@
 package controller
 
 import (
+       "context"
        "net/http"
        "os"
        "path/filepath"
@@ -36,14 +37,18 @@ func newServerFromIntegrationTestEnv(c *check.C) *httpserver.Server {
        handler := &Handler{Cluster: &arvados.Cluster{
                ClusterID:  "zzzzz",
                PostgreSQL: integrationTestCluster().PostgreSQL,
-               TLS:        arvados.TLS{Insecure: true},
+
+               EnableBetaController14287: enableBetaController14287,
        }}
+       handler.Cluster.TLS.Insecure = true
        arvadostest.SetServiceURL(&handler.Cluster.Services.RailsAPI, "https://"+os.Getenv("ARVADOS_TEST_API_HOST"))
        arvadostest.SetServiceURL(&handler.Cluster.Services.Controller, "http://localhost:/")
 
        srv := &httpserver.Server{
                Server: http.Server{
-                       Handler: httpserver.AddRequestIDs(httpserver.LogRequests(log, handler)),
+                       Handler: httpserver.HandlerWithContext(
+                               ctxlog.Context(context.Background(), log),
+                               httpserver.AddRequestIDs(httpserver.LogRequests(handler))),
                },
                Addr: ":",
        }