Looks good, and wgrant's review was very thorough, so r=me with some
small comments.
[1]
+ arguments = [
+ "-A",
+ "-d", self.distribution.name,
+ ]
+ for suite in self.getSuites():
+ arguments += ["-s", suite]
If there are long forms of these arguments, would you be happy to use
them so that it's easier to see what's happening?
[2]
+ message = dedent("""\
+ You are receiving this email because you are registered in
+ Launchpad as a release manager for %s.
+
+ The archive indexes for %s have been successfully created.
It matters very little, but will MailController reflow the paragraphs
in case the replacements are very long?
[3]
+ controller = MailController(
+ from_addr, self.getMailRecipients(), subject, message)
+ if controller is not None:
+ controller.send()
Is there any situation where controller will be None?
Looks good, and wgrant's review was very thorough, so r=me with some
small comments.
[1]
+ arguments = [ on.name,
+ "-A",
+ "-d", self.distributi
+ ]
+ for suite in self.getSuites():
+ arguments += ["-s", suite]
If there are long forms of these arguments, would you be happy to use
them so that it's easier to see what's happening?
[2]
+ message = dedent("""\
+ You are receiving this email because you are registered in
+ Launchpad as a release manager for %s.
+
+ The archive indexes for %s have been successfully created.
It matters very little, but will MailController reflow the paragraphs
in case the replacements are very long?
[3]
+ controller = MailController( ipients( ), subject, message)
+ from_addr, self.getMailRec
+ if controller is not None:
+ controller.send()
Is there any situation where controller will be None?
[4]
+ def destroySelf(self): ob`.""" self.context) .remove( self.context)
+ """See `IDistributionJ
+ Store.of(
Is this needed? It doesn't seem to be used (and isn't tested).
[5]
+def silence_ publisher_ logger( ): "publish- distro" ).setLevel( FATAL)
+ """Silence the logger that `run_publisher` creates."""
+ getLogger(
Does the test harness return the logger to its previous level after
the test has run? If not, perhaps this could be changed into a
Fixture.
[6]
+ def makeJob(self, distroseries=None): riesIndexesJob` .""" makeDistroSerie s() roxy(self. getJobSource( ).makeFor( distroseries) ) roxy(distributi on.main_ archive) archive) distsroot
+ """Create an `CreateDistroSe
+ if distroseries is None:
+ distroseries = self.factory.
+ job = removeSecurityP
+ return job
+
+ def getDistsRoot(self, distribution):
+ """Get distsroot directory for `distribution`."""
+ archive = removeSecurityP
+ pub_config = getPubConfig(
+ return pub_config.
Why is removeSecurityP roxy() needed here? The need to unwrap these
objects makes me think that their security proxies are not configured
correctly.
[7]
+ def becomeArchivePu blisher( self): er(config. archivepublishe r.dbuser) (self.becomeDbU ser, 'launchpad')
+ """Become the archive publisher database user (and clean up later)."""
+ self.becomeDbUs
+ self.addCleanup
I can't see that any other tests clean up after using becomeDbUser(),
so perhaps you don't need to either.
[8]
+ def test_getSuites_ ignores_ suites_ for_other_ distroseries( self):
+ # getSuites does not list suites in the distributio that do not
s/distributio/ distribution/
[9]
+ def test_schedule_ index_creation( self): Type.CREATEDIST ROSERIESINDEXES ,
...
+ DistributionJob
Old spelling.