Merge lp:~thumper/launchpad/script-error-reporting-utility into lp:launchpad

Proposed by Tim Penhey
Status: Merged
Merged at revision: 9693
Proposed branch: lp:~thumper/launchpad/script-error-reporting-utility
Merge into: lp:launchpad
Diff against target: 37 lines
2 files modified
lib/lp/code/model/tests/test_diff.py (+5/-0)
script.zcml (+5/-1)
To merge this branch: bzr merge lp:~thumper/launchpad/script-error-reporting-utility
Reviewer Review Type Date Requested Status
Michael Hudson-Doyle Approve
Review via email: mp+13329@code.launchpad.net

Commit message

Add configuration to register the error reporting utility for the scripts.

To post a comment you must log in.
Revision history for this message
Tim Penhey (thumper) wrote :

A simple branch to add the error reporting utility configuration for our scripts.

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

I think having one particular test duplicated between the different layers is silly -- can you divide the tests between the diff creating ones (should run in zopeless layer) and diff reading ones (should run in the functional layer)?

Otherwise fine.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/code/model/tests/test_diff.py'
2--- lib/lp/code/model/tests/test_diff.py 2009-10-05 14:17:48 +0000
3+++ lib/lp/code/model/tests/test_diff.py 2009-10-14 03:05:23 +0000
4@@ -109,6 +109,11 @@
5 diff = self._create_diff(content)
6 self.assertTrue(diff.oversized)
7
8+
9+class TestDiffInScripts(DiffTestCase):
10+
11+ layer = LaunchpadZopelessLayer
12+
13 def test_mergePreviewFromBranches(self):
14 # mergePreviewFromBranches generates the correct diff.
15 bmp, source_rev_id, target_rev_id = self.createExampleMerge()
16
17=== modified file 'script.zcml'
18--- script.zcml 2009-07-13 18:15:02 +0000
19+++ script.zcml 2009-10-14 03:05:23 +0000
20@@ -15,7 +15,7 @@
21
22 <!-- package-includes/*-configure.zcml contains package configuration
23 shared between a normal launchpad instance and the test suite.
24- package-includes/*-configure-normal.zcml and
25+ package-includes/*-configure-normal.zcml and
26 package-includes/*-configure-testing.zcml contain configuration
27 that needs to be different between normal and test modes.
28 -->
29@@ -31,4 +31,8 @@
30 scripts which would be bad
31 -->
32 <!-- <includeOverrides file="override-configure-normal.zcml" /> -->
33+ <!-- Make sure that the scripts have access to to the error
34+ reporting utility.
35+ -->
36+ <includeOverrides file="override-includes/errorlog-configure.zcml" />
37 </configure>