[ARVADOS] created: 1.1.0-71-g4d2dfa7

Git user git at public.curoverse.com
Mon Oct 23 15:28:24 EDT 2017


        at  4d2dfa766a8a78b4f3f303d1d8d8dfe7488a85af (commit)


commit 4d2dfa766a8a78b4f3f303d1d8d8dfe7488a85af
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date:   Mon Oct 23 15:27:57 2017 -0400

    12125: Add test deleting project via API updates FUSE.
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>

diff --git a/services/fuse/tests/test_mount.py b/services/fuse/tests/test_mount.py
index ec8868a..bef7d27 100644
--- a/services/fuse/tests/test_mount.py
+++ b/services/fuse/tests/test_mount.py
@@ -745,6 +745,34 @@ class FuseUpdateFromEventTest(MountTestBase):
             attempt(self.assertEqual, ["file1.txt"], llfuse.listdir(os.path.join(self.mounttmp)))
 
 
+class FuseDeleteProjectEventTest(MountTestBase):
+    def runTest(self):
+
+        aproject = self.api.groups().create(body={
+            "name": "aproject",
+            "group_class": "project"
+        }).execute()
+
+        bproject = self.api.groups().create(body={
+            "name": "bproject",
+            "group_class": "project",
+            "owner_uuid": aproject["uuid"]
+        }).execute()
+
+        self.make_mount(fuse.ProjectDirectory,
+                        project_object=self.api.users().current().execute())
+
+        self.operations.listen_for_events()
+
+        d1 = llfuse.listdir(os.path.join(self.mounttmp, "aproject"))
+        self.assertEqual(["bproject"], sorted(d1))
+
+        self.api.groups().delete(uuid=bproject["uuid"]).execute()
+
+        for attempt in AssertWithTimeout(10):
+            attempt(self.assertEqual, [], llfuse.listdir(os.path.join(self.mounttmp, "aproject")))
+
+
 def fuseFileConflictTestHelper(mounttmp):
     class Test(unittest.TestCase):
         def runTest(self):

commit 24696c5a7411f66b2b1b1a677c60907629f209e9
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Wed Oct 4 08:35:02 2017 -0400

    12125: Recognize that projects (groups) can be trashed, too.
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>

diff --git a/services/fuse/arvados_fuse/fusedir.py b/services/fuse/arvados_fuse/fusedir.py
index 7bd00d5..becd669 100644
--- a/services/fuse/arvados_fuse/fusedir.py
+++ b/services/fuse/arvados_fuse/fusedir.py
@@ -994,13 +994,12 @@ class ProjectDirectory(Directory):
             # Was moved to somewhere else, so don't try to add entry
             new_name = None
 
-        if ev.get("object_kind") == "arvados#collection":
-            if old_attrs.get("is_trashed"):
-                # Was previously deleted
-                old_name = None
-            if new_attrs.get("is_trashed"):
-                # Has been deleted
-                new_name = None
+        if old_attrs.get("is_trashed"):
+            # Was previously deleted
+            old_name = None
+        if new_attrs.get("is_trashed"):
+            # Has been deleted
+            new_name = None
 
         if new_name != old_name:
             ent = None

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list