From f6ca62df31984f2029ffa00e823f5770a02e33c4 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Tue, 4 Mar 2008 01:24:35 -0700 Subject: [PATCH] test_system: improve test coverage of publish/retrieve status --- src/allmydata/test/test_system.py | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 -- 2.45.2