Merge lp:~fginther/cupstream2distro-config/fix_lp1201466 into lp:cupstream2distro-config

Proposed by Francis Ginther
Status: Merged
Approved by: Chris Gagnon
Approved revision: 740
Merged at revision: 740
Proposed branch: lp:~fginther/cupstream2distro-config/fix_lp1201466
Merge into: lp:cupstream2distro-config
Diff against target: 38 lines (+14/-3)
2 files modified
c2dconfigutils/cu2dWatchDog.py (+5/-3)
tests/test_CheckStalledMPs.py (+9/-0)
To merge this branch: bzr merge lp:~fginther/cupstream2distro-config/fix_lp1201466
Reviewer Review Type Date Requested Status
Chris Gagnon (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+183962@code.launchpad.net

Commit message

When checking for stalled branches, do not attempt to include branches that don't exist in launchpad.

Description of the change

When checking for stalled branches, do not attempt to include branches that don't exist in launchpad.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Chris Gagnon (chris.gagnon) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'c2dconfigutils/cu2dWatchDog.py'
--- c2dconfigutils/cu2dWatchDog.py 2013-04-10 15:57:24 +0000
+++ c2dconfigutils/cu2dWatchDog.py 2013-09-04 19:30:09 +0000
@@ -91,9 +91,11 @@
91 target_branch = 'lp:' + project91 target_branch = 'lp:' + project
92 if parameters and 'target_branch' in parameters:92 if parameters and 'target_branch' in parameters:
93 target_branch = parameters['target_branch']93 target_branch = parameters['target_branch']
94 stalled = stalled + self.check_branch(launchpad,94 branch_stalled = self.check_branch(launchpad,
95 target_branch,95 target_branch,
96 threshold)96 threshold)
97 if branch_stalled:
98 stalled = stalled + branch_stalled
97 for message in stalled:99 for message in stalled:
98 logging.error(message)100 logging.error(message)
99 if stalled:101 if stalled:
100102
=== modified file 'tests/test_CheckStalledMPs.py'
--- tests/test_CheckStalledMPs.py 2013-04-10 15:48:31 +0000
+++ tests/test_CheckStalledMPs.py 2013-09-04 19:30:09 +0000
@@ -154,6 +154,15 @@
154 ret = self.command.process_stacks([1], 120, '')154 ret = self.command.process_stacks([1], 120, '')
155 self.assertThat(ret, Equals(1))155 self.assertThat(ret, Equals(1))
156156
157 def test_process_stacks_no_lp_branch(self):
158 '''Verify that if a branch is not found in lp, it is not stalled.'''
159 load_stack_cfg = lambda x, y: self.stack_cfg
160 self.command.check_branch = lambda x, y, z: None
161 with patch('c2dconfigutils.cu2dWatchDog.load_stack_cfg',
162 load_stack_cfg):
163 ret = self.command.process_stacks([1], 120, '')
164 self.assertThat(ret, Equals(0))
165
157 def test_process_stacks_stackcfg_fails_to_load(self):166 def test_process_stacks_stackcfg_fails_to_load(self):
158 load_stack_cfg = lambda x, y: None167 load_stack_cfg = lambda x, y: None
159 with patch('c2dconfigutils.cu2dWatchDog.load_stack_cfg',168 with patch('c2dconfigutils.cu2dWatchDog.load_stack_cfg',

Subscribers

People subscribed via source and target branches

to all changes: