X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/8b90f80efca772efd2697ffc70d7809c32564171..50be38a022fe282c55703c9e3903b0400eaa20fb:/services/fuse/tests/test_mount.py diff --git a/services/fuse/tests/test_mount.py b/services/fuse/tests/test_mount.py index f9fcd73c5d..764a099149 100644 --- a/services/fuse/tests/test_mount.py +++ b/services/fuse/tests/test_mount.py @@ -1,4 +1,5 @@ import arvados +import arvados.safeapi import arvados_fuse as fuse import glob import json @@ -21,7 +22,7 @@ class MountTestBase(unittest.TestCase): self.mounttmp = tempfile.mkdtemp() run_test_server.run() run_test_server.authorize_with("admin") - self.api = fuse.SafeApi(arvados.config) + self.api = arvados.safeapi.ThreadSafeApiCache(arvados.config.settings()) def make_mount(self, root_class, **root_kwargs): operations = fuse.Operations(os.getuid(), os.getgid()) @@ -259,14 +260,26 @@ class FuseSharedTest(MountTestBase): # Double check that we can open and read objects in this folder as a file, # and that its contents are what we expect. - with open(os.path.join( + pipeline_template_path = os.path.join( self.mounttmp, 'FUSE User', 'FUSE Test Project', - 'pipeline template in FUSE project.pipelineTemplate')) as f: + 'pipeline template in FUSE project.pipelineTemplate') + with open(pipeline_template_path) as f: j = json.load(f) self.assertEqual("pipeline template in FUSE project", j['name']) + # check mtime on template + st = os.stat(pipeline_template_path) + self.assertEqual(st.st_mtime, 1397493304) + + # check mtime on collection + st = os.stat(os.path.join( + self.mounttmp, + 'FUSE User', + 'collection #1 owned by FUSE')) + self.assertEqual(st.st_mtime, 1391448174) + class FuseHomeTest(MountTestBase): def runTest(self):