3961: fix FuseSharedTest
[arvados.git] / services / fuse / tests / test_mount.py
index 8287a1995604e13edc36ddde07054610af1e1cdc..256f820619f6ee7dbb7da950fd72dea4600618bf 100644 (file)
@@ -73,7 +73,7 @@ class FuseMountTest(MountTestBase):
     def runTest(self):
         # Create the request handler
         operations = fuse.Operations(os.getuid(), os.getgid())
-        e = operations.inodes.add_entry(fuse.CollectionDirectory(llfuse.ROOT_INODE, operations.inodes, self.api, self.testcollection))
+        e = operations.inodes.add_entry(fuse.CollectionDirectory(llfuse.ROOT_INODE, operations.inodes, self.api, 0, self.testcollection))
 
         llfuse.init(operations, self.mounttmp, [])
         t = threading.Thread(None, lambda: llfuse.main())
@@ -128,7 +128,7 @@ class FuseMagicTest(MountTestBase):
     def runTest(self):
         # Create the request handler
         operations = fuse.Operations(os.getuid(), os.getgid())
-        e = operations.inodes.add_entry(fuse.MagicDirectory(llfuse.ROOT_INODE, operations.inodes, self.api))
+        e = operations.inodes.add_entry(fuse.MagicDirectory(llfuse.ROOT_INODE, operations.inodes, self.api, 0))
 
         self.mounttmp = tempfile.mkdtemp()
 
@@ -161,19 +161,9 @@ class FuseMagicTest(MountTestBase):
 
 
 class FuseTagsTest(MountTestBase):
-    def setUp(self):
-        super(FuseTagsTest, self).setUp()
-
-        cw = arvados.CollectionWriter()
-
-        cw.start_new_file('foo')
-        cw.write("foo")
-
-        self.testcollection = cw.finish()
-
     def runTest(self):
         operations = fuse.Operations(os.getuid(), os.getgid())
-        e = operations.inodes.add_entry(fuse.TagsDirectory(llfuse.ROOT_INODE, operations.inodes, self.api))
+        e = operations.inodes.add_entry(fuse.TagsDirectory(llfuse.ROOT_INODE, operations.inodes, self.api, 0))
 
         llfuse.init(operations, self.mounttmp, [])
         t = threading.Thread(None, lambda: llfuse.main())
@@ -194,18 +184,11 @@ class FuseTagsTest(MountTestBase):
         d3.sort()
         self.assertEqual(['foo'], d3)
 
-        files = {}
-        files[os.path.join(self.mounttmp, 'foo_tag', 'zzzzz-4zz18-fy296fx3hot09f7', 'foo')] = 'foo'
-
-        for k, v in files.items():
-            with open(os.path.join(self.mounttmp, k)) as f:
-                self.assertEqual(v, f.read())
-
 
 class FuseTagsUpdateTest(MountTestBase):
     def runRealTest(self):
         operations = fuse.Operations(os.getuid(), os.getgid())
-        e = operations.inodes.add_entry(fuse.TagsDirectory(llfuse.ROOT_INODE, operations.inodes, self.api, poll_time=1))
+        e = operations.inodes.add_entry(fuse.TagsDirectory(llfuse.ROOT_INODE, operations.inodes, self.api, 0, poll_time=1))
 
         llfuse.init(operations, self.mounttmp, [])
         t = threading.Thread(None, lambda: llfuse.main())
@@ -258,7 +241,7 @@ class FuseTagsUpdateTest(MountTestBase):
 class FuseSharedTest(MountTestBase):
     def runTest(self):
         operations = fuse.Operations(os.getuid(), os.getgid())
-        e = operations.inodes.add_entry(fuse.SharedDirectory(llfuse.ROOT_INODE, operations.inodes, self.api, self.api.users().current().execute()['uuid']))
+        e = operations.inodes.add_entry(fuse.SharedDirectory(llfuse.ROOT_INODE, operations.inodes, self.api, 0, self.api.users().current().execute()['uuid']))
 
         llfuse.init(operations, self.mounttmp, [])
         t = threading.Thread(None, lambda: llfuse.main())
@@ -276,14 +259,22 @@ class FuseSharedTest(MountTestBase):
         self.assertEqual(['A Project',
                           "Empty collection",
                           "Empty collection.link",
+                          "Pipeline Template with Input Parameter with Search.pipelineTemplate",
                           "Pipeline Template with Jobspec Components.pipelineTemplate",
-                          "pipeline_with_job.pipelineInstance"
+                          "collection_expires_in_future",
+                          "collection_with_same_name_in_aproject_and_home_project",
+                          "owned_by_active",
+                          "pipeline_to_merge_params.pipelineInstance",
+                          "pipeline_with_job.pipelineInstance",
+                          "pipeline_with_tagged_collection_input.pipelineInstance"
                       ], d2)
 
         d3 = os.listdir(os.path.join(self.mounttmp, 'Active User', 'A Project'))
         d3.sort()
         self.assertEqual(["A Subproject",
                           "Two Part Pipeline Template.pipelineTemplate",
+                          "collection_to_move_around",
+                          "collection_with_same_name_in_aproject_and_home_project",
                           "zzzzz-4zz18-fy296fx3hot09f7 added sometime"
                       ], d3)
 
@@ -295,7 +286,7 @@ class FuseSharedTest(MountTestBase):
 class FuseHomeTest(MountTestBase):
     def runTest(self):
         operations = fuse.Operations(os.getuid(), os.getgid())
-        e = operations.inodes.add_entry(fuse.ProjectDirectory(llfuse.ROOT_INODE, operations.inodes, self.api, self.api.users().current().execute()))
+        e = operations.inodes.add_entry(fuse.ProjectDirectory(llfuse.ROOT_INODE, operations.inodes, self.api, 0, self.api.users().current().execute()))
 
         llfuse.init(operations, self.mounttmp, [])
         t = threading.Thread(None, lambda: llfuse.main())