]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Fix test_move_tree.
authorDaira Hopwood <daira@jacaranda.org>
Mon, 2 Nov 2015 15:43:06 +0000 (15:43 +0000)
committerDaira Hopwood <daira@jacaranda.org>
Mon, 2 Nov 2015 15:43:06 +0000 (15:43 +0000)
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
src/allmydata/test/test_magic_folder.py

index c00ccac66c4aba61164797be178435c55723d3ff..043142af4686c5649a32ecade2437e4a14e0cdaf 100644 (file)
@@ -132,13 +132,12 @@ class MagicFolderTestMixin(MagicFolderCLITestMixin, ShouldFailMixin, ReallyEqual
 
         def _check_move_empty_tree(res):
             print "_check_move_empty_tree"
-            downloaded_d = self.magicfolder.downloader.set_hook('processed')
             uploaded_d = self.magicfolder.uploader.set_hook('processed')
             self.mkdir_nonascii(empty_tree_dir)
             os.rename(empty_tree_dir, new_empty_tree_dir)
             self.notify(to_filepath(new_empty_tree_dir), self.inotify.IN_MOVED_TO)
 
-            return DeferredListShouldSucceed([downloaded_d, uploaded_d])
+            return uploaded_d
         d.addCallback(_check_move_empty_tree)
         d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('uploader.objects_failed'), 0))
         d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('uploader.objects_succeeded'), 1))
@@ -146,11 +145,8 @@ class MagicFolderTestMixin(MagicFolderCLITestMixin, ShouldFailMixin, ReallyEqual
         d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('uploader.objects_queued'), 0))
         d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('uploader.directories_created'), 1))
 
-        # FIXME check that Bob downloaded/created the empty tree.
-
         def _check_move_small_tree(res):
             print "_check_move_small_tree"
-            downloaded_d = self.magicfolder.downloader.set_hook('processed', ignore_count=1)
             uploaded_d = self.magicfolder.uploader.set_hook('processed', ignore_count=1)
             self.mkdir_nonascii(small_tree_dir)
             what_path = abspath_expanduser_unicode(u"what", base=small_tree_dir)
@@ -158,7 +154,7 @@ class MagicFolderTestMixin(MagicFolderCLITestMixin, ShouldFailMixin, ReallyEqual
             os.rename(small_tree_dir, new_small_tree_dir)
             self.notify(to_filepath(new_small_tree_dir), self.inotify.IN_MOVED_TO)
 
-            return DeferredListShouldSucceed([downloaded_d, uploaded_d])
+            return uploaded_d
         d.addCallback(_check_move_small_tree)
         d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('uploader.objects_failed'), 0))
         d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('uploader.objects_succeeded'), 3))
@@ -168,13 +164,12 @@ class MagicFolderTestMixin(MagicFolderCLITestMixin, ShouldFailMixin, ReallyEqual
 
         def _check_moved_tree_is_watched(res):
             print "_check_moved_tree_is_watched"
-            downloaded_d = self.magicfolder.downloader.set_hook('processed', ignore_count=1)
             uploaded_d = self.magicfolder.uploader.set_hook('processed')
             another_path = abspath_expanduser_unicode(u"another", base=new_small_tree_dir)
             fileutil.write(another_path, "file")
             self.notify(to_filepath(another_path), self.inotify.IN_CLOSE_WRITE)
 
-            return DeferredListShouldSucceed([downloaded_d, uploaded_d])
+            return uploaded_d
         d.addCallback(_check_moved_tree_is_watched)
         d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('uploader.objects_failed'), 0))
         d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('uploader.objects_succeeded'), 4))