From: Brian Warner Date: Tue, 4 Mar 2008 08:24:35 +0000 (-0700) Subject: test_system: improve test coverage of publish/retrieve status X-Git-Tag: allmydata-tahoe-0.9.0~76 X-Git-Url: https://git.rkrishnan.org/pf/content/en/seg/provisioning?a=commitdiff_plain;h=f6ca62df31984f2029ffa00e823f5770a02e33c4;p=tahoe-lafs%2Ftahoe-lafs.git test_system: improve test coverage of publish/retrieve status --- diff --git a/src/allmydata/test/test_system.py b/src/allmydata/test/test_system.py index bd959620..aae0180e 100644 --- a/src/allmydata/test/test_system.py +++ b/src/allmydata/test/test_system.py @@ -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