]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
test_system: improve test coverage of publish/retrieve status
authorBrian Warner <warner@allmydata.com>
Tue, 4 Mar 2008 08:24:35 +0000 (01:24 -0700)
committerBrian Warner <warner@allmydata.com>
Tue, 4 Mar 2008 08:24:35 +0000 (01:24 -0700)
src/allmydata/test/test_system.py

index bd9596202a6f758bfcdb2084aa322cdf7bf8545f..aae0180e6a137736bab831c6418cf20cfb28a023 100644 (file)
@@ -1204,6 +1204,10 @@ class SystemTest(testutil.SignalMixin, testutil.PollMixin, unittest.TestCase):
             for ul in self.clients[0].list_recent_uploads():
                 if ul.get_size() > 200:
                     self._up_status = ul.get_counter()
+            rs = self.clients[0].list_recent_retrieve()[0]
+            self._retrieve_status = rs.get_counter()
+            ps = self.clients[0].list_recent_publish()[0]
+            self._publish_status = ps.get_counter()
 
             # and that there are some upload- and download- status pages
             return self.GET("status/up-%d" % self._up_status)
@@ -1211,6 +1215,12 @@ class SystemTest(testutil.SignalMixin, testutil.PollMixin, unittest.TestCase):
         def _got_up(res):
             return self.GET("status/down-%d" % self._down_status)
         d.addCallback(_got_up)
+        def _got_down(res):
+            return self.GET("status/publish-%d" % self._publish_status)
+        d.addCallback(_got_down)
+        def _got_publish(res):
+            return self.GET("status/retrieve-%d" % self._retrieve_status)
+        d.addCallback(_got_publish)
 
         # TODO: mangle the second segment of a file, to test errors that
         # occur after we've already sent some good data, which uses a