[Buildbot-commits] buildbot/buildbot/test test_config.py, 1.35, 1.36
Brian Warner
warner at users.sourceforge.net
Mon Jul 24 22:09:22 UTC 2006
Update of /cvsroot/buildbot/buildbot/buildbot/test
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19556/buildbot/test
Modified Files:
test_config.py
Log Message:
[project @ check for duplicate Scheduler names when loading the config file]
Original author: warner at lothar.com
Date: 2006-07-24 22:01:13
Index: test_config.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_config.py,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- test_config.py 7 Jun 2006 16:53:19 -0000 1.35
+++ test_config.py 24 Jul 2006 22:09:20 -0000 1.36
@@ -622,9 +622,9 @@
# reloading the same config file should leave the schedulers in place
d = self.buildmaster.loadConfig(newcfg)
- d.addCallback(self._testschedulers_6, sch)
+ d.addCallback(self._testSchedulers_6, sch)
return d
- def _testschedulers_6(self, res, sch1):
+ def _testSchedulers_6(self, res, sch1):
sch2 = self.buildmaster.allSchedulers()
self.failUnlessEqual(len(sch2), 2)
sch1.sort()
@@ -634,6 +634,17 @@
self.failUnlessIdentical(sch1[1], sch2[1])
self.failUnlessIdentical(sch1[0].parent, self.buildmaster)
self.failUnlessIdentical(sch1[1].parent, self.buildmaster)
+ badcfg = self.schedulersCfg + \
+"""
+c['schedulers'] = [Scheduler('dup', None, 60, []),
+ Scheduler('dup', None, 60, [])]
+"""
+ d = defer.maybeDeferred(self.buildmaster.loadConfig, badcfg)
+ d.addBoth(self._testSchedulers_7)
+ return d
+ def _testSchedulers_7(self, res):
+ self.shouldBeFailure(res, ValueError)
+
def testBuilders(self):
More information about the Commits
mailing list