[Buildbot-commits] buildbot/buildbot/test test_webparts.py, 1.1, 1.2
Brian Warner
warner at users.sourceforge.net
Sun Sep 30 01:04:14 UTC 2007
Update of /cvsroot/buildbot/buildbot/buildbot/test
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25055/buildbot/test
Modified Files:
test_webparts.py
Log Message:
[project @ test_webparts: make sure WebStatus works after a reload]
Original author: warner at lothar.com
Date: 2007-09-30 01:03:46+00:00
Index: test_webparts.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_webparts.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- test_webparts.py 28 Sep 2007 09:33:31 -0000 1.1
+++ test_webparts.py 30 Sep 2007 01:04:12 -0000 1.2
@@ -28,6 +28,16 @@
port = list(self.find_webstatus(m)[0])[0]._port.getHost().port
self.baseurl = "http://localhost:%d/" % port
+ def reconfigMaster(self, extraconfig):
+ config = base_config + extraconfig
+ d = self.master.loadConfig(config)
+ def _done(res):
+ m = self.master
+ port = list(self.find_webstatus(m)[0])[0]._port.getHost().port
+ self.baseurl = "http://localhost:%d/" % port
+ d.addCallback(_done)
+ return d
+
def getAndCheck(self, url, substring, show=False):
d = client.getPage(url)
def _show_weberror(why):
@@ -92,6 +102,17 @@
"""
self.startMaster(extraconfig)
d = defer.succeed(None)
+ d.addCallback(self._do_page_tests)
+ extraconfig2 = """
+ws = html.WebStatus(http_port=0, allowForce=True)
+c['status'] = [ws]
+"""
+ d.addCallback(lambda res: self.reconfigMaster(extraconfig2))
+ d.addCallback(self._do_page_tests)
+ return d
+
+ def _do_page_tests(self, res):
+ d = defer.succeed(None)
d.addCallback(self._check, "", "Welcome to the Buildbot")
d.addCallback(self._check, "waterfall", "current activity")
d.addCallback(self._check, "about", "Buildbot is a free software")
More information about the Commits
mailing list