6219: add test to list contents of a project with many collections.
authorradhika <radhika@curoverse.com>
Tue, 30 Jun 2015 23:05:57 +0000 (19:05 -0400)
committerradhika <radhika@curoverse.com>
Tue, 30 Jun 2015 23:05:57 +0000 (19:05 -0400)
services/fuse/tests/performance/test_collection_performance.py

index 46a49ec87719217835d66ea4f113712bd3475532..c1e24f0e3bafd008334421f7fb9af5c7e326d4e6 100644 (file)
@@ -406,3 +406,19 @@ class UsingMagicDir_CreateCollectionWithManyFilesAndMoveEachFileIntoAnother(Moun
         updated_collection = self.api.collections().get(uuid=collection1.manifest_locator()).execute()
         for name in file_names:
           self.assertTrue(name in updated_collection['manifest_text'])
+
+class FuseListLargeProjectContents(MountTestBase):
+    @profiled
+    def listLargeProjectContents(self):
+        project_contents = llfuse.listdir(self.mounttmp)
+        self.assertEqual(201, len(project_contents))
+        self.assertIn('Collection_1', project_contents)
+
+        for collection_name in project_contents:
+            collection_contents = llfuse.listdir(os.path.join(self.mounttmp, collection_name))
+            self.assertIn('baz', collection_contents)
+
+    def test_listLargeProjectContents(self):
+        self.make_mount(fuse.ProjectDirectory,
+                        project_object=run_test_server.fixture('groups')['project_with_201_collections'])
+        self.listLargeProjectContents()