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
1=== modified file 'c2dconfigutils/cu2dWatchDog.py'
2--- c2dconfigutils/cu2dWatchDog.py 2013-04-10 15:57:24 +0000
3+++ c2dconfigutils/cu2dWatchDog.py 2013-09-04 19:30:09 +0000
4@@ -91,9 +91,11 @@
5 target_branch = 'lp:' + project
6 if parameters and 'target_branch' in parameters:
7 target_branch = parameters['target_branch']
8- stalled = stalled + self.check_branch(launchpad,
9- target_branch,
10- threshold)
11+ branch_stalled = self.check_branch(launchpad,
12+ target_branch,
13+ threshold)
14+ if branch_stalled:
15+ stalled = stalled + branch_stalled
16 for message in stalled:
17 logging.error(message)
18 if stalled:
19
20=== modified file 'tests/test_CheckStalledMPs.py'
21--- tests/test_CheckStalledMPs.py 2013-04-10 15:48:31 +0000
22+++ tests/test_CheckStalledMPs.py 2013-09-04 19:30:09 +0000
23@@ -154,6 +154,15 @@
24 ret = self.command.process_stacks([1], 120, '')
25 self.assertThat(ret, Equals(1))
26
27+ def test_process_stacks_no_lp_branch(self):
28+ '''Verify that if a branch is not found in lp, it is not stalled.'''
29+ load_stack_cfg = lambda x, y: self.stack_cfg
30+ self.command.check_branch = lambda x, y, z: None
31+ with patch('c2dconfigutils.cu2dWatchDog.load_stack_cfg',
32+ load_stack_cfg):
33+ ret = self.command.process_stacks([1], 120, '')
34+ self.assertThat(ret, Equals(0))
35+
36 def test_process_stacks_stackcfg_fails_to_load(self):
37 load_stack_cfg = lambda x, y: None
38 with patch('c2dconfigutils.cu2dWatchDog.load_stack_cfg',

Subscribers

People subscribed via source and target branches

to all changes: