X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/e1de889290360f6dd5b5fdeab10cea997bcc6962..916d57c9fe68a9e12472e4d174d38d93086c6529:/services/keep-web/server_test.go diff --git a/services/keep-web/server_test.go b/services/keep-web/server_test.go index 324588a29a..bddd6db2ce 100644 --- a/services/keep-web/server_test.go +++ b/services/keep-web/server_test.go @@ -6,16 +6,20 @@ import ( "io" "io/ioutil" "net" + "os" "os/exec" "strings" "testing" + "git.curoverse.com/arvados.git/sdk/go/arvados" "git.curoverse.com/arvados.git/sdk/go/arvadosclient" "git.curoverse.com/arvados.git/sdk/go/arvadostest" "git.curoverse.com/arvados.git/sdk/go/keepclient" check "gopkg.in/check.v1" ) +var testAPIHost = os.Getenv("ARVADOS_API_HOST") + var _ = check.Suite(&IntegrationSuite{}) // IntegrationSuite tests need an API server and a keep-web server @@ -137,7 +141,7 @@ type curlCase struct { } func (s *IntegrationSuite) Test200(c *check.C) { - anonymousTokens = []string{arvadostest.AnonymousToken} + s.testServer.Config.AnonymousTokens = []string{arvadostest.AnonymousToken} for _, spec := range []curlCase{ // My collection { @@ -307,10 +311,14 @@ func (s *IntegrationSuite) TearDownSuite(c *check.C) { func (s *IntegrationSuite) SetUpTest(c *check.C) { arvadostest.ResetEnv() - s.testServer = &server{} - var err error - address = "127.0.0.1:0" - err = s.testServer.Start() + s.testServer = &server{Config: &Config{ + Client: arvados.Client{ + APIHost: testAPIHost, + Insecure: true, + }, + Listen: "127.0.0.1:0", + }} + err := s.testServer.Start() c.Assert(err, check.Equals, nil) }