Skip to content

Commit

Permalink
handle BuilderConfig(.., mergeRequests=False); fixes #2555
Browse files Browse the repository at this point in the history
  • Loading branch information
djmitche committed Sep 1, 2013
1 parent ee1d0a5 commit f9b531e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion master/buildbot/config.py
Expand Up @@ -706,7 +706,7 @@ def getConfigDict(self):
rv['env'] = self.env
if self.properties:
rv['properties'] = self.properties
if self.mergeRequests:
if self.mergeRequests is not None:
rv['mergeRequests'] = self.mergeRequests
if self.description:
rv['description'] = self.description
Expand Down
12 changes: 12 additions & 0 deletions master/buildbot/test/unit/test_config.py
Expand Up @@ -1115,6 +1115,18 @@ def test_getConfigDict(self):
'slavenames': ['s2', 's1'],
})

def test_getConfigDict_mergeRequests(self):
for mr in (False, lambda a,b,c:False):
cfg = config.BuilderConfig(name='b', mergeRequests=mr,
factory=self.factory, slavename='s1')
self.assertEqual(cfg.getConfigDict(), {'builddir': 'b',
'mergeRequests': mr,
'name': 'b',
'slavebuilddir': 'b',
'factory': self.factory,
'slavenames': ['s1'],
})



class FakeService(config.ReconfigurableServiceMixin,
Expand Down

0 comments on commit f9b531e

Please sign in to comment.