]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
webish: fix 'not running helper' status indicator on welcome page, add tests
authorBrian Warner <warner@allmydata.com>
Mon, 14 Apr 2008 23:28:11 +0000 (16:28 -0700)
committerBrian Warner <warner@allmydata.com>
Mon, 14 Apr 2008 23:28:11 +0000 (16:28 -0700)
src/allmydata/test/test_system.py
src/allmydata/webish.py

index 970c5adab554997d1d55e4b2957539c739059e19..1aa682a59bb2fd019e9bba1b13f453140c678a17 100644 (file)
@@ -1198,6 +1198,7 @@ class SystemTest(testutil.SignalMixin, testutil.PollMixin, unittest.TestCase):
             self.failUnless(expected in page,
                             "I didn't see the right 'My nodeid' message "
                             "in: %s" % page)
+            self.failUnless("Helper: 0 active uploads" in page)
         d.addCallback(_got_welcome)
         d.addCallback(self.log, "done with _got_welcome")
 
@@ -1206,6 +1207,7 @@ class SystemTest(testutil.SignalMixin, testutil.PollMixin, unittest.TestCase):
         def _got_welcome_helper(page):
             self.failUnless("Connected to helper?: <span>yes</span>" in page,
                             page)
+            self.failUnless("Not running helper" in page)
         d.addCallback(_got_welcome_helper)
 
         d.addCallback(lambda res: getPage(base + public))
index 4f0bebf66f3b9a617817b1eef9b2d4d00cd2c47b..35013dd83a53ae70db35f44a0ae34bca91f08eb1 100644 (file)
@@ -1472,7 +1472,7 @@ class Root(rend.Page):
         try:
             h = client.getServiceNamed("helper")
             stats = h.get_stats()
-            active_uploads = stats["helper"]["CHK_active_uploads"]
+            active_uploads = stats["chk_upload_helper.active_uploads"]
             ul[T.li["Helper: %d active uploads" % (active_uploads,)]]
         except KeyError:
             ul[T.li["Not running helper"]]