X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/5ae0a422e60788a4039d17d2d8dfb60f250329c7..4a919918a4ce37b5290793f02fa959db1c073590:/lib/config/deprecated_test.go diff --git a/lib/config/deprecated_test.go b/lib/config/deprecated_test.go index 76313ebb16..ea9b50d035 100644 --- a/lib/config/deprecated_test.go +++ b/lib/config/deprecated_test.go @@ -47,7 +47,7 @@ func testLoadLegacyConfig(content []byte, mungeFlag string, c *check.C) (*arvado func (s *LoadSuite) TestDeprecatedNodeProfilesToServices(c *check.C) { hostname, err := os.Hostname() c.Assert(err, check.IsNil) - s.checkEquivalent(c, ` + checkEquivalent(c, ` Clusters: z1111: NodeProfiles: @@ -187,3 +187,32 @@ func fmtKeepproxyConfig(param string, debugLog bool) string { } `, debugLog, param) } + +func (s *LoadSuite) TestLegacyArvGitHttpdConfig(c *check.C) { + content := []byte(` +{ + "Client": { + "Scheme": "", + "APIHost": "example.com", + "AuthToken": "abcdefg", + }, + "Listen": ":9000", + "GitCommand": "/test/git", + "GitoliteHome": "/test/gitolite", + "RepoRoot": "/test/reporoot", + "ManagementToken": "xyzzy" +} +`) + f := "-legacy-git-httpd-config" + cluster, err := testLoadLegacyConfig(content, f, c) + + c.Check(err, check.IsNil) + c.Check(cluster, check.NotNil) + c.Check(cluster.Services.Controller.ExternalURL, check.Equals, arvados.URL{Scheme: "https", Host: "example.com"}) + c.Check(cluster.SystemRootToken, check.Equals, "abcdefg") + c.Check(cluster.ManagementToken, check.Equals, "xyzzy") + c.Check(cluster.Git.GitCommand, check.Equals, "/test/git") + c.Check(cluster.Git.GitoliteHome, check.Equals, "/test/gitolite") + c.Check(cluster.Git.Repositories, check.Equals, "/test/reporoot") + c.Check(cluster.Services.Keepproxy.InternalURLs[arvados.URL{Host: ":9000"}], check.Equals, arvados.ServiceInstance{}) +}