user context is needed to pass tests ..
authorNico Cesar <nico@nicocesar.com>
Fri, 4 Dec 2020 22:40:27 +0000 (17:40 -0500)
committerNico Cesar <nico@nicocesar.com>
Fri, 4 Dec 2020 22:40:27 +0000 (17:40 -0500)
Arvados-DCO-1.1-Signed-off-by: Nico Cesar <nico@curii.com>

lib/controller/federation/conn.go
lib/controller/integration_test.go
lib/controller/rpc/conn.go

index 30c15b57c1fb0331197c3fd38492b53430c79ad5..3ec17c17ed9e3ced78954fb9985026130bd34cb1 100644 (file)
@@ -343,7 +343,7 @@ func (conn *Conn) ContainerRequestList(ctx context.Context, options arvados.List
 
 func (conn *Conn) ContainerRequestCreate(ctx context.Context, options arvados.CreateOptions) (arvados.ContainerRequest, error) {
        be := conn.chooseBackend(options.ClusterID)
-       log.Printf("THIS IS THE federation.Conn.ContainerRequestCreate() for %s we are %s", options.ClusterID, conn.cluster.ClusterID)
+       log.Printf("THIS IS federation.Conn.ContainerRequestCreate() for %s we are %s", options.ClusterID, conn.cluster.ClusterID)
        if be == conn.local {
                return be.ContainerRequestCreate(ctx, options)
        }
index e75e996f48a3a35b8291be223e0cfd667ba061bf..03b760eaa1294058f81962597d610fd8b3fb0368 100644 (file)
@@ -538,7 +538,7 @@ func (s *IntegrationSuite) TestRuntimeTokenInCR(c *check.C) {
 func (s *IntegrationSuite) TestIntermediateCluster(c *check.C) {
        conn1 := s.conn("z1111")
        rootctx1, _, _ := s.rootClients("z1111")
-       _, ac1, _, _ := s.userClients(rootctx1, c, conn1, "z1111", true)
+       uctx1, ac1, _, _ := s.userClients(rootctx1, c, conn1, "z1111", true)
        //conn2 := s.conn("z2222")
        //rootctx2, _, _ := s.rootClients("z2222")
        //_, ac2, _, _ := s.userClients(rootctx2, c, conn2, "z2222", true)
@@ -559,7 +559,7 @@ func (s *IntegrationSuite) TestIntermediateCluster(c *check.C) {
                        "output_path":     "/",
                        "runtime_token":   tt.token,
                }
-               cr, err := conn1.ContainerRequestCreate(rootctx1, arvados.CreateOptions{ClusterID: "z2222", Attrs: rq})
+               cr, err := conn1.ContainerRequestCreate(uctx1, arvados.CreateOptions{ClusterID: "z2222", Attrs: rq})
 
                c.Check(err, check.IsNil)
                c.Check(cr, check.NotNil)
index b3fd541bbb28672d12b1f97e756d6af5897d5bff..254f0adfce6058c9ac7e9661c107e7a73b6c48d0 100644 (file)
@@ -288,7 +288,7 @@ func (conn *Conn) ContainerUnlock(ctx context.Context, options arvados.GetOption
 }
 
 func (conn *Conn) ContainerRequestCreate(ctx context.Context, options arvados.CreateOptions) (arvados.ContainerRequest, error) {
-       log.Printf("THIS IS THE rcp.Conn.ContainerRequestCreate(): %s", options.ClusterID)
+       log.Printf("THIS IS THE rcp.Conn.ContainerRequestCreate() for %s we are %s", options.ClusterID, conn.clusterID)
        ep := arvados.EndpointContainerRequestCreate
        var resp arvados.ContainerRequest
        err := conn.requestAndDecode(ctx, &resp, ep, nil, options)