X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/fc1c9a3d80a5fc71142ad11f4eda05c26e351569..cab1fdf123d680195145b817f2227d84276e7436:/lib/controller/federation_test.go diff --git a/lib/controller/federation_test.go b/lib/controller/federation_test.go index 211c761980..a3b198ffc9 100644 --- a/lib/controller/federation_test.go +++ b/lib/controller/federation_test.go @@ -70,7 +70,7 @@ func (s *FederationSuite) SetUpTest(c *check.C) { cluster.Collections.BlobSigningTTL = arvados.Duration(time.Hour * 24 * 14) arvadostest.SetServiceURL(&cluster.Services.RailsAPI, "http://localhost:1/") arvadostest.SetServiceURL(&cluster.Services.Controller, "http://localhost:/") - s.testHandler = &Handler{Cluster: cluster} + s.testHandler = &Handler{Cluster: cluster, BackgroundContext: ctxlog.Context(context.Background(), s.log)} s.testServer = newServerFromIntegrationTestEnv(c) s.testServer.Server.BaseContext = func(net.Listener) context.Context { return ctxlog.Context(context.Background(), s.log) @@ -721,7 +721,7 @@ func (s *FederationSuite) TestCreateRemoteContainerRequestCheckRuntimeToken(c *c var aca arvados.APIClientAuthorization c.Check(json.NewDecoder(resp.Body).Decode(&aca), check.IsNil) c.Check(aca.ExpiresAt, check.NotNil) // Time.Now()+BlobSigningTTL - t, _ := time.Parse(time.RFC3339Nano, aca.ExpiresAt) + t := aca.ExpiresAt c.Check(t.After(time.Now().Add(s.testHandler.Cluster.API.MaxTokenLifetime.Duration())), check.Equals, true) c.Check(t.Before(time.Now().Add(s.testHandler.Cluster.Collections.BlobSigningTTL.Duration())), check.Equals, true) }