launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #26035
[Merge] ~ilasc/launchpad:bug-1910403 into launchpad:master
Ioana Lasc has proposed merging ~ilasc/launchpad:bug-1910403 into launchpad:master.
Commit message:
UserUploadHandler fails without Maintainer email
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~ilasc/launchpad/+git/launchpad/+merge/396505
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~ilasc/launchpad:bug-1910403 into launchpad:master.
diff --git a/lib/lp/archiveuploader/tests/data/suite/bar_1.0-1/bar_1.0-1_source.changes b/lib/lp/archiveuploader/tests/data/suite/bar_1.0-1/bar_1.0-1_source.changes
index a132b2d..402a6da 100644
--- a/lib/lp/archiveuploader/tests/data/suite/bar_1.0-1/bar_1.0-1_source.changes
+++ b/lib/lp/archiveuploader/tests/data/suite/bar_1.0-1/bar_1.0-1_source.changes
@@ -9,7 +9,7 @@ Architecture: source
Version: 1.0-1
Distribution: breezy
Urgency: low
-Maintainer: Launchpad team <launchpad@xxxxxxxxxxxxxxxxxxx>
+Maintainer: Launchpad team
Changed-By: Daniel Silverstone <daniel.silverstone@xxxxxxxxxxxxx>
Description:
bar - Stuff for testing
diff --git a/lib/lp/archiveuploader/tests/test_uploadprocessor.py b/lib/lp/archiveuploader/tests/test_uploadprocessor.py
index 91ec622..6fe30cb 100644
--- a/lib/lp/archiveuploader/tests/test_uploadprocessor.py
+++ b/lib/lp/archiveuploader/tests/test_uploadprocessor.py
@@ -537,6 +537,31 @@ class TestUploadProcessor(TestUploadProcessorBase):
finally:
shutil.rmtree(testdir)
+ def testUploadWithoutMaintainerEmail(self):
+ """Attempt to reproduce bug 694768.
+
+ Without altering the file
+ lib/lp/archiveuploader/tests/data/suite/bar_1.0-1/bar_1.0-1_source.changes
+ will pass.
+
+ Running this without an email address for the Maintainer field
+ in that file however will fail but not with the exception in the Bug description.
+
+ """
+ uploadprocessor = self.setupBreezyAndGetUploadProcessor()
+ upload_dir = self.queueUpload("bar_1.0-1")
+ self.processUpload(uploadprocessor, upload_dir)
+
+ # Check it went ok to the NEW queue and all is going well so far.
+ daniel = "daniel.silverstone@xxxxxxxxxxxxx"
+ foo_bar = "foo.bar@xxxxxxxxxxxxx"
+ notifications = self.assertEmailQueueLength(2)
+ for expected_to_addr, msg in zip((daniel, foo_bar), notifications):
+ self.assertEqual(expected_to_addr, msg["X-Envelope-To"])
+ self.assertTrue(
+ "NEW" in str(msg),
+ "Expected email containing 'NEW', got:\n%s" % msg)
+
def testRejectionEmailForUnhandledException(self):
"""Test there's a rejection email when nascentupload breaks.
Follow ups