1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
12 "git.curoverse.com/arvados.git/sdk/go/arvados"
13 "git.curoverse.com/arvados.git/sdk/go/arvadostest"
14 "git.curoverse.com/arvados.git/sdk/go/ctxlog"
15 "git.curoverse.com/arvados.git/sdk/go/httpserver"
16 check "gopkg.in/check.v1"
19 func integrationTestCluster() *arvados.Cluster {
20 cfg, err := arvados.GetConfig(filepath.Join(os.Getenv("WORKSPACE"), "tmp", "arvados.yml"))
24 cc, err := cfg.GetCluster("zzzzz")
31 // Return a new unstarted controller server, using the Rails API
32 // provided by the integration-testing environment.
33 func newServerFromIntegrationTestEnv(c *check.C) *httpserver.Server {
34 log := ctxlog.TestLogger(c)
36 handler := &Handler{Cluster: &arvados.Cluster{
38 PostgreSQL: integrationTestCluster().PostgreSQL,
40 EnableBetaController14287: enableBetaController14287,
42 handler.Cluster.TLS.Insecure = true
43 arvadostest.SetServiceURL(&handler.Cluster.Services.RailsAPI, "https://"+os.Getenv("ARVADOS_TEST_API_HOST"))
44 arvadostest.SetServiceURL(&handler.Cluster.Services.Controller, "http://localhost:/")
46 srv := &httpserver.Server{
48 Handler: httpserver.AddRequestIDs(httpserver.LogRequests(log, handler)),