X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/6762d1501f67860180045bbce3e63ef573d07fec..b89ab7f9270acfabe9139d14d7071cf117b39bd4:/lib/controller/federation/login_test.go diff --git a/lib/controller/federation/login_test.go b/lib/controller/federation/login_test.go index ad91bcf802..c05ebfce69 100644 --- a/lib/controller/federation/login_test.go +++ b/lib/controller/federation/login_test.go @@ -43,13 +43,11 @@ func (s *LoginSuite) TestDeferToLoginCluster(c *check.C) { func (s *LoginSuite) TestLogout(c *check.C) { s.cluster.Services.Workbench1.ExternalURL = arvados.URL{Scheme: "https", Host: "workbench1.example.com"} s.cluster.Services.Workbench2.ExternalURL = arvados.URL{Scheme: "https", Host: "workbench2.example.com"} - s.cluster.Login.Google.Enable = true - s.cluster.Login.Google.ClientID = "zzzzzzzzzzzzzz" s.addHTTPRemote(c, "zhome", &arvadostest.APIStub{}) s.cluster.Login.LoginCluster = "zhome" // s.fed is already set by SetUpTest, but we need to // reinitialize with the above config changes. - s.fed = New(s.cluster) + s.fed = New(s.cluster, nil) returnTo := "https://app.example.com/foo?bar" for _, trial := range []struct { @@ -64,7 +62,7 @@ func (s *LoginSuite) TestLogout(c *check.C) { {token: "v2/zhome-aaaaa-aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", returnTo: returnTo, target: "http://" + s.cluster.RemoteClusters["zhome"].Host + "/logout?" + url.Values{"return_to": {returnTo}}.Encode()}, } { c.Logf("trial %#v", trial) - ctx := context.Background() + ctx := s.ctx if trial.token != "" { ctx = auth.NewContext(ctx, &auth.Credentials{Tokens: []string{trial.token}}) }