18078: Fix tests
authorPeter Amstutz <peter.amstutz@curii.com>
Fri, 3 Sep 2021 21:22:14 +0000 (17:22 -0400)
committerPeter Amstutz <peter.amstutz@curii.com>
Fri, 3 Sep 2021 21:22:14 +0000 (17:22 -0400)
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>

services/fuse/tests/test_exec.py
services/fuse/tests/test_mount.py

index c90e7fd8df96967d009b981067cfbacfb9b2d0d3..6af60302bc788c796b50d5b57e33ee2bf3274332 100644 (file)
@@ -21,6 +21,7 @@ except:
 
 def try_exec(mnt, cmd):
     try:
+        os.environ['KEEP_LOCAL_STORE'] = tempfile.mkdtemp()
         arvados_fuse.command.Mount(
             arvados_fuse.command.ArgumentParser().parse_args([
                 '--read-write',
index e9343e783881149f8c127f7f4ab38b6b0b6faa3d..157f55e4a4be4ed035aeeeba6f5cfdb402c8a348 100644 (file)
@@ -789,13 +789,13 @@ class FuseDeleteProjectEventTest(MountTestBase):
             attempt(self.assertEqual, [], llfuse.listdir(os.path.join(self.mounttmp, "aproject")))
 
 
-def fuseFileConflictTestHelper(mounttmp, uuid, keeptmp):
+def fuseFileConflictTestHelper(mounttmp, uuid, keeptmp, settings):
     class Test(unittest.TestCase):
         def runTest(self):
             os.environ['KEEP_LOCAL_STORE'] = keeptmp
 
             with open(os.path.join(mounttmp, "file1.txt"), "w") as f:
-                with arvados.collection.Collection(uuid) as collection2:
+                with arvados.collection.Collection(uuid, api_client=arvados.api_from_config('v1', apiconfig=settings)) as collection2:
                     with collection2.open("file1.txt", "w") as f2:
                         f2.write("foo")
                 f.write("bar")
@@ -827,7 +827,7 @@ class FuseFileConflictTest(MountTestBase):
         self.assertEqual([], sorted(d1))
 
         # See note in MountTestBase.setUp
-        self.pool.apply(fuseFileConflictTestHelper, (self.mounttmp, collection.manifest_locator(), self.keeptmp))
+        self.pool.apply(fuseFileConflictTestHelper, (self.mounttmp, collection.manifest_locator(), self.keeptmp, arvados.config.settings()))
 
 
 def fuseUnlinkOpenFileTest(mounttmp):