18215: Adds tests for Create & Update calls.
[arvados.git] / lib / controller / server_test.go
index edc5fd117de33f4b96dd3fa53f815ab382b13bf1..b2b3365a2015b2ac899a3b62f45d563042267ac9 100644 (file)
@@ -6,14 +6,16 @@ package controller
 
 import (
        "context"
+       "net"
        "net/http"
        "os"
        "path/filepath"
+       "time"
 
-       "git.curoverse.com/arvados.git/sdk/go/arvados"
-       "git.curoverse.com/arvados.git/sdk/go/arvadostest"
-       "git.curoverse.com/arvados.git/sdk/go/ctxlog"
-       "git.curoverse.com/arvados.git/sdk/go/httpserver"
+       "git.arvados.org/arvados.git/sdk/go/arvados"
+       "git.arvados.org/arvados.git/sdk/go/arvadostest"
+       "git.arvados.org/arvados.git/sdk/go/ctxlog"
+       "git.arvados.org/arvados.git/sdk/go/httpserver"
        check "gopkg.in/check.v1"
 )
 
@@ -37,18 +39,20 @@ func newServerFromIntegrationTestEnv(c *check.C) *httpserver.Server {
        handler := &Handler{Cluster: &arvados.Cluster{
                ClusterID:  "zzzzz",
                PostgreSQL: integrationTestCluster().PostgreSQL,
-
-               EnableBetaController14287: enableBetaController14287,
        }}
        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"))
        arvadostest.SetServiceURL(&handler.Cluster.Services.Controller, "http://localhost:/")
 
        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 ctxlog.Context(context.Background(), log)
+                       },
+                       Handler: httpserver.AddRequestIDs(httpserver.LogRequests(handler)),
                },
                Addr: ":",
        }