X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/d97c9ecca25f449ad928963f6257a01a8bbbf1e7..614145d096375ae18c7020e8f9205eaa2a1d0d39:/lib/config/deprecated_test.go diff --git a/lib/config/deprecated_test.go b/lib/config/deprecated_test.go index 845c73c053..ca376ba0bb 100644 --- a/lib/config/deprecated_test.go +++ b/lib/config/deprecated_test.go @@ -11,7 +11,7 @@ import ( "os" "time" - "git.curoverse.com/arvados.git/sdk/go/arvados" + "git.arvados.org/arvados.git/sdk/go/arvados" check "gopkg.in/check.v1" ) @@ -89,6 +89,41 @@ Clusters: `) } +func (s *LoadSuite) TestDeprecatedLoginBackend(c *check.C) { + checkEquivalent(c, ` +Clusters: + z1111: + Login: + GoogleClientID: aaaa + GoogleClientSecret: bbbb + GoogleAlternateEmailAddresses: true +`, ` +Clusters: + z1111: + Login: + Google: + Enable: true + ClientID: aaaa + ClientSecret: bbbb + AlternateEmailAddresses: true +`) + checkEquivalent(c, ` +Clusters: + z1111: + Login: + ProviderAppID: aaaa + ProviderAppSecret: bbbb +`, ` +Clusters: + z1111: + Login: + SSO: + Enable: true + ProviderAppID: aaaa + ProviderAppSecret: bbbb +`) +} + func (s *LoadSuite) TestLegacyKeepWebConfig(c *check.C) { content := []byte(` { @@ -117,7 +152,7 @@ func (s *LoadSuite) TestLegacyKeepWebConfig(c *check.C) { cluster, err := testLoadLegacyConfig(content, "-legacy-keepweb-config", c) c.Check(err, check.IsNil) - c.Check(cluster.Services.Controller.ExternalURL, check.Equals, arvados.URL{Scheme: "https", Host: "example.com"}) + c.Check(cluster.Services.Controller.ExternalURL, check.Equals, arvados.URL{Scheme: "https", Host: "example.com", Path: "/"}) c.Check(cluster.SystemRootToken, check.Equals, "abcdefg") c.Check(cluster.Collections.WebDAVCache.TTL, check.Equals, arvados.Duration(60*time.Second)) @@ -127,7 +162,7 @@ func (s *LoadSuite) TestLegacyKeepWebConfig(c *check.C) { c.Check(cluster.Collections.WebDAVCache.MaxPermissionEntries, check.Equals, 100) c.Check(cluster.Collections.WebDAVCache.MaxUUIDEntries, check.Equals, 100) - c.Check(cluster.Services.WebDAVDownload.ExternalURL, check.Equals, arvados.URL{Host: "download.example.com"}) + c.Check(cluster.Services.WebDAVDownload.ExternalURL, check.Equals, arvados.URL{Host: "download.example.com", Path: "/"}) c.Check(cluster.Services.WebDAVDownload.InternalURLs[arvados.URL{Host: ":80"}], check.NotNil) c.Check(cluster.Services.WebDAV.InternalURLs[arvados.URL{Host: ":80"}], check.NotNil) @@ -160,7 +195,7 @@ func (s *LoadSuite) TestLegacyKeepproxyConfig(c *check.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.Services.Controller.ExternalURL, check.Equals, arvados.URL{Scheme: "https", Host: "example.com", Path: "/"}) c.Check(cluster.SystemRootToken, check.Equals, "abcdefg") c.Check(cluster.ManagementToken, check.Equals, "xyzzy") c.Check(cluster.Services.Keepproxy.InternalURLs[arvados.URL{Host: ":80"}], check.Equals, arvados.ServiceInstance{}) @@ -170,6 +205,7 @@ func (s *LoadSuite) TestLegacyKeepproxyConfig(c *check.C) { content = []byte(fmtKeepproxyConfig("", false)) cluster, err = testLoadLegacyConfig(content, f, c) + c.Check(err, check.IsNil) c.Check(cluster.SystemLogs.LogLevel, check.Equals, "info") content = []byte(fmtKeepproxyConfig(`"DisableGet": true,`, true)) @@ -228,7 +264,7 @@ func (s *LoadSuite) TestLegacyArvGitHttpdConfig(c *check.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.Services.Controller.ExternalURL, check.Equals, arvados.URL{Scheme: "https", Host: "example.com", Path: "/"}) c.Check(cluster.SystemRootToken, check.Equals, "abcdefg") c.Check(cluster.ManagementToken, check.Equals, "xyzzy") c.Check(cluster.Git.GitCommand, check.Equals, "/test/git")