From 86578bc3cdc90f6dc60139938c8a89fa8c00cd10 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Mon, 14 Apr 2008 16:28:11 -0700 Subject: [PATCH] webish: fix 'not running helper' status indicator on welcome page, add tests --- src/allmydata/test/test_system.py | 2 ++ src/allmydata/webish.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/allmydata/test/test_system.py b/src/allmydata/test/test_system.py index 970c5ada..1aa682a5 100644 --- a/src/allmydata/test/test_system.py +++ b/src/allmydata/test/test_system.py @@ -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?: yes" in page, page) + self.failUnless("Not running helper" in page) d.addCallback(_got_welcome_helper) d.addCallback(lambda res: getPage(base + public)) diff --git a/src/allmydata/webish.py b/src/allmydata/webish.py index 4f0bebf6..35013dd8 100644 --- a/src/allmydata/webish.py +++ b/src/allmydata/webish.py @@ -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"]] -- 2.45.2