Skip to content

Commit

Permalink
unit test error paths in MasterConfig.load_status()
Browse files Browse the repository at this point in the history
Test that invalid 'status' option in master config file is
handled properly.
  • Loading branch information
Elmir Jagudin committed Mar 5, 2013
1 parent 31b3c1e commit ba0529e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions master/buildbot/test/unit/test_config.py
Expand Up @@ -719,6 +719,13 @@ def test_load_change_sources_list(self):
dict(change_source=[chsrc]))
self.assertResults(change_sources=[chsrc])

def test_load_status_not_list(self):
self.cfg.load_status(self.filename, dict(status="not-list"))
self.assertConfigError(self.errors, "must be a list of")

def test_load_status_not_status_rec(self):
self.cfg.load_status(self.filename, dict(status=['fo']))
self.assertConfigError(self.errors, "must be a list of")

def test_load_user_managers_defaults(self):
self.cfg.load_user_managers(self.filename, {})
Expand Down

0 comments on commit ba0529e

Please sign in to comment.