9950: Propagate Client.Insecure config to arvadosclient library via ARVADOS_API_HOST_...
authorTom Clegg <tom@curoverse.com>
Wed, 21 Sep 2016 18:34:05 +0000 (14:34 -0400)
committerTom Clegg <tom@curoverse.com>
Mon, 26 Sep 2016 17:43:28 +0000 (13:43 -0400)
services/arv-git-httpd/auth_handler.go
services/arv-git-httpd/gitolite_test.go
services/arv-git-httpd/integration_test.go

index 31865011b79908a50f8c2d676c0f3e30fb6ad3d6..bfdb3969d70030d14dd2232431636cb5762d400d 100644 (file)
@@ -21,6 +21,11 @@ type authHandler struct {
 
 func (h *authHandler) setup() {
        os.Setenv("ARVADOS_API_HOST", theConfig.Client.APIHost)
+       if theConfig.Client.Insecure {
+               os.Setenv("ARVADOS_API_HOST_INSECURE", "1")
+       } else {
+               os.Setenv("ARVADOS_API_HOST_INSECURE", "")
+       }
        h.clientPool = arvadosclient.MakeClientPool()
 }
 
index d21a814a61ab88499f0434de5dc73fba1b0a7fc3..219eb11cda2141f45106e9ffc4a551b241767345 100644 (file)
@@ -44,7 +44,8 @@ func (s *GitoliteSuite) SetUpTest(c *check.C) {
        s.tmpRepoRoot = s.gitoliteHome + "/repositories"
        s.Config = &Config{
                Client: arvados.Client{
-                       APIHost: os.Getenv("ARVADOS_API_HOST"),
+                       APIHost:  os.Getenv("ARVADOS_API_HOST"),
+                       Insecure: true,
                },
                Listen:     ":0",
                GitCommand: "/usr/share/gitolite3/gitolite-shell",
index 5ec5ccba02157242c8967a7b2292181ef62a0b6e..f772b4d1946cc705e21a77b495fe2d833459887a 100644 (file)
@@ -70,7 +70,8 @@ func (s *IntegrationSuite) SetUpTest(c *check.C) {
        if s.Config == nil {
                s.Config = &Config{
                        Client: arvados.Client{
-                               APIHost: os.Getenv("ARVADOS_API_HOST"),
+                               APIHost:  os.Getenv("ARVADOS_API_HOST"),
+                               Insecure: true,
                        },
                        Listen:     ":0",
                        GitCommand: "/usr/bin/git",