15370: Ensure keep data dirs exists for test.
authorTom Clegg <tom@curii.com>
Tue, 31 May 2022 14:27:00 +0000 (10:27 -0400)
committerTom Clegg <tom@curii.com>
Tue, 31 May 2022 14:27:00 +0000 (10:27 -0400)
...instead of assuming some other test suite has created them by
calling arvadostest.StartKeep().

Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@curii.com>

lib/crunchrun/integration_test.go

index a9a270b07b3f7d744587355dc2152acd5f33ceb3..3f7c7e50f14f7713c0de4885f0cae4fd64ab11f8 100644 (file)
@@ -20,6 +20,7 @@ import (
        "git.arvados.org/arvados.git/sdk/go/arvadostest"
        "git.arvados.org/arvados.git/sdk/go/ctxlog"
        "git.arvados.org/arvados.git/sdk/go/keepclient"
        "git.arvados.org/arvados.git/sdk/go/arvadostest"
        "git.arvados.org/arvados.git/sdk/go/ctxlog"
        "git.arvados.org/arvados.git/sdk/go/keepclient"
+       "git.arvados.org/arvados.git/services/keepstore"
        . "gopkg.in/check.v1"
 )
 
        . "gopkg.in/check.v1"
 )
 
@@ -193,6 +194,14 @@ func (s *integrationSuite) TestRunTrivialContainerWithLocalKeepstore(c *C) {
                        volume.AccessViaHosts = nil
                        volume.Replication = 2
                        cluster.Volumes[uuid] = volume
                        volume.AccessViaHosts = nil
                        volume.Replication = 2
                        cluster.Volumes[uuid] = volume
+
+                       var v keepstore.UnixVolume
+                       err = json.Unmarshal(volume.DriverParameters, &v)
+                       c.Assert(err, IsNil)
+                       err = os.Mkdir(v.Root, 0777)
+                       if !os.IsExist(err) {
+                               c.Assert(err, IsNil)
+                       }
                }
                cluster.Containers.LocalKeepLogsToContainerLog = trial.logConfig
 
                }
                cluster.Containers.LocalKeepLogsToContainerLog = trial.logConfig