X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/6e1c29f2530ff36892ebe64a81e3d962766763de..5536864737f7729775f9b2ee95516d6df5053451:/services/arv-git-httpd/integration_test.go diff --git a/services/arv-git-httpd/integration_test.go b/services/arv-git-httpd/integration_test.go index 5ec5ccba02..1d252599cd 100644 --- a/services/arv-git-httpd/integration_test.go +++ b/services/arv-git-httpd/integration_test.go @@ -70,20 +70,25 @@ func (s *IntegrationSuite) SetUpTest(c *check.C) { if s.Config == nil { s.Config = &Config{ Client: arvados.Client{ - APIHost: os.Getenv("ARVADOS_API_HOST"), + APIHost: arvadostest.APIHost(), + Insecure: true, }, Listen: ":0", GitCommand: "/usr/bin/git", RepoRoot: s.tmpRepoRoot, } } + + // Clear ARVADOS_API_* env vars before starting up the server, + // to make sure arv-git-httpd doesn't use them or complain + // about them being missing. + os.Unsetenv("ARVADOS_API_HOST") + os.Unsetenv("ARVADOS_API_HOST_INSECURE") + os.Unsetenv("ARVADOS_API_TOKEN") + theConfig = s.Config err = s.testServer.Start() c.Assert(err, check.Equals, nil) - - // Clear ARVADOS_API_TOKEN after starting up the server, to - // make sure arv-git-httpd doesn't use it. - os.Setenv("ARVADOS_API_TOKEN", "unused-token-placates-client-library") } func (s *IntegrationSuite) TearDownTest(c *check.C) { @@ -107,6 +112,8 @@ func (s *IntegrationSuite) TearDownTest(c *check.C) { s.tmpWorkdir = "" s.Config = nil + + theConfig = defaultConfig() } func (s *IntegrationSuite) RunGit(c *check.C, token, gitCmd, repo string, args ...string) error {