]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
add version checking to alice bob test
authorDavid Stainton <dstainton415@gmail.com>
Fri, 31 Jul 2015 18:09:30 +0000 (11:09 -0700)
committerDavid Stainton <dstainton415@gmail.com>
Fri, 31 Jul 2015 18:09:30 +0000 (11:09 -0700)
src/allmydata/test/test_magic_folder.py

index 1007f7332a7fa2f73963add81a134950870dda67..e6490e39a818cb6775191ef2a4d3fcdb885bf177 100644 (file)
@@ -360,9 +360,11 @@ class MagicFolderTestMixin(MagicFolderTestMixin, ShouldFailMixin, ReallyEqualMix
             self.bob_magicfolder.downloader.set_callback(d2.callback)
             return d2
         d.addCallback(Bob_wait_for_download)
-        #d.addCallback(lambda ign: self._check_version_in_local_db(self.bob_magicfolder, u"file1", 0))
+        d.addCallback(lambda ign: self._check_version_in_local_db(self.bob_magicfolder, u"file1", 0))
+        d.addCallback(lambda ign: self._check_version_in_dmd(self.bob_magicfolder, u"file1", 0)) # XXX prolly not needed
         d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('downloader.objects_downloaded', client=self.bob_magicfolder._client), 1))
 
+
         # test deletion of file behavior
         def Alice_delete_file(result):
             print "Alice deletes the file!\n"
@@ -373,8 +375,14 @@ class MagicFolderTestMixin(MagicFolderTestMixin, ShouldFailMixin, ReallyEqualMix
         d.addCallback(Alice_delete_file)
         d.addCallback(Alice_wait_for_upload)
         d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('uploader.objects_succeeded', client=self.alice_magicfolder._client), 2))
+        d.addCallback(lambda ign: self._check_version_in_local_db(self.alice_magicfolder, u"file1", 1))
+        d.addCallback(lambda ign: self._check_version_in_dmd(self.alice_magicfolder, u"file1", 1))
+
         d.addCallback(Bob_wait_for_download)
         d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('downloader.objects_downloaded', client=self.bob_magicfolder._client), 2))
+        d.addCallback(lambda ign: self._check_version_in_local_db(self.bob_magicfolder, u"file1", 1))
+        d.addCallback(lambda ign: self._check_version_in_dmd(self.bob_magicfolder, u"file1", 1))
+
 
         def Alice_rewrite_file(result):
             print "Alice rewrites file\n"