4389: Merge branch 'master' into 4389-breadcrumbs-infinite-loop
[arvados.git] / services / fuse / tests / test_mount.py
index 3db5281eb0c866e55e1411e4d5fe06d6912ec7d4..bb14d43c0cc2de2a173aba4d4df26accef40b827 100644 (file)
@@ -257,29 +257,35 @@ class FuseSharedTest(MountTestBase):
         shared_dirs.sort()
         self.assertIn('FUSE User', shared_dirs)
 
-        # fuse_user_dirs is a list of the directories owned
-        # by the "FUSE User" test user.
-        fuse_user_dirs = os.listdir(os.path.join(self.mounttmp, 'FUSE User'))
-        fuse_user_dirs.sort()
-        self.assertEqual(['FUSE Test Project',
-                          'collection #1 owned by FUSE',
-                          'collection #2 owned by FUSE'
-                      ], fuse_user_dirs)
+        # fuse_user_objs is a list of the objects owned by the FUSE
+        # test user (which present as files in the 'FUSE User'
+        # directory)
+        fuse_user_objs = os.listdir(os.path.join(self.mounttmp, 'FUSE User'))
+        fuse_user_objs.sort()
+        self.assertEqual(['Empty collection.link',                # permission link on collection
+                          'FUSE Test Project',                    # project owned by user
+                          'collection #1 owned by FUSE',          # collection owned by user
+                          'collection #2 owned by FUSE',          # collection owned by user
+                          'pipeline instance owned by FUSE.pipelineInstance',  # pipeline instance owned by user
+                      ], fuse_user_objs)
 
         # test_proj_files is a list of the files in the FUSE Test Project.
         test_proj_files = os.listdir(os.path.join(self.mounttmp, 'FUSE User', 'FUSE Test Project'))
         test_proj_files.sort()
-        self.assertEqual(['Pipeline Template in FUSE Project.pipelineTemplate',
-                          'collection in FUSE project',
+        self.assertEqual(['collection in FUSE project',
+                          'pipeline instance in FUSE project.pipelineInstance',
+                          'pipeline template in FUSE project.pipelineTemplate'
                       ], test_proj_files)
 
+        # 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(
                 self.mounttmp,
                 'FUSE User',
                 'FUSE Test Project',
-                'Pipeline Template in FUSE Project.pipelineTemplate')) as f:
+                'pipeline template in FUSE project.pipelineTemplate')) as f:
             j = json.load(f)
-            self.assertEqual("Pipeline Template in FUSE Project", j['name'])
+            self.assertEqual("pipeline template in FUSE project", j['name'])
 
 
 class FuseHomeTest(MountTestBase):