Merge lp:~michael.nelson/launchpad/ppa-privatisation-test-refactor2 into lp:launchpad
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | Michael Nelson on 2010-02-22 | ||||
| Approved revision: | not available | ||||
| Merged at revision: | not available | ||||
| Proposed branch: | lp:~michael.nelson/launchpad/ppa-privatisation-test-refactor2 | ||||
| Merge into: | lp:launchpad | ||||
| Prerequisite: | lp:~michael.nelson/launchpad/ppa-privatisation-test-refactor | ||||
| Diff against target: |
525 lines (+101/-84) 7 files modified
lib/lp/archivepublisher/tests/test_generate_ppa_htaccess.py (+26/-24) lib/lp/buildmaster/tests/test_builder.py (+17/-6) lib/lp/soyuz/scripts/tests/test_copypackage.py (+19/-17) lib/lp/soyuz/scripts/tests/test_expire_ppa_bins.py (+14/-13) lib/lp/soyuz/scripts/tests/test_populatearchive.py (+10/-13) lib/lp/soyuz/scripts/tests/test_publishdistro.py (+6/-8) lib/lp/testing/factory.py (+9/-3) |
||||
| To merge this branch: | bzr merge lp:~michael.nelson/launchpad/ppa-privatisation-test-refactor2 | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Guilherme Salgado (community) | code | 2010-02-19 | Approve on 2010-02-19 |
|
Review via email:
|
|||
| Michael Nelson (michael.nelson) wrote : | # |
| Guilherme Salgado (salgado) wrote : | # |
Hi Michael,
This is a very nice branch; thanks a lot for changing the tests to rely
on less sample data. I only have a few remarks, but it's good to go.
review approve code
On Fri, 2010-02-19 at 11:48 +0000, Michael Nelson wrote:
>
> This is the second branch in a series to refactor soyuz tests after
> fixing bug 506203.
>
> The MP for the branch that actually fixed the bug is at:
>
> https:/
>
> The fix ensures that the privacy of a PPA cannot be altered once it
> has packages published. Unfortunately most of our test infrastructure
> does exactly that (switches the privacy to do a few tests and then
> switches it back).
>
> === modified file 'lib/lp/
> --- lib/lp/
> +++ lib/lp/
> @@ -119,14 +119,22 @@
> build.builder = self.builders[
> count += 1
>
> - def setUp(self):
> - """Publish some builds for the test archive."""
> - super(TestFindB
> + def createPPAs(self):
> + """Helper to create the PPAs for this test.
>
> + This is here only so that it can be overridden for a subsequent
> + private PPA test, privatising the PPA before any packages
> + are published."""
> # Create two PPAs and add some builds to each.
Will the makeArchive() call actually add builds to the PPAs?
> self.ppa_joe = self.factory.
> self.ppa_jim = self.factory.
>
> + def setUp(self):
> + """Publish some builds for the test archive."""
> + super(TestFindB
> +
> + self.createPPAs()
> +
> self.joe_builds = []
> self.joe_
> self.publisher.
> @@ -183,11 +191,19 @@
> build = getUtility(
> self.failUnless
>
> +
> +class TestFindBuildCa
> +
> + def createPPAs(self):
> + """Overridden to ensure that joe's ppa is privatised before any
> + packages are published."""
> + super(TestFindB
> + self.ppa_
> + self.ppa_
> +
> def test_findBuildC
> # If a ppa is private it will be able to have parallel builds
> # for the one architecture.
> - self.ppa_
> - self.ppa_
> next_job = removeSecurityP
> build = getUtility(
> self.failUnless
>
> === modified file 'lib/lp/
> --- lib/lp/
> +++ lib/lp/soyuz...
| Michael Nelson (michael.nelson) wrote : | # |
On Fri, Feb 19, 2010 at 2:06 PM, Guilherme Salgado
<email address hidden> wrote:
> Review: Approve code
> Hi Michael,
>
> This is a very nice branch; thanks a lot for changing the tests to rely
> on less sample data. I only have a few remarks, but it's good to go.
>
Thanks Guilherme. One note below.
> review approve code
>
> On Fri, 2010-02-19 at 11:48 +0000, Michael Nelson wrote:
...
>> === modified file 'lib/lp/
>> --- lib/lp/
>> +++ lib/lp/
>> @@ -119,14 +119,22 @@
>> build.builder = self.builders[
>> count += 1
>>
>> - def setUp(self):
>> - """Publish some builds for the test archive."""
>> - super(
>> + def createPPAs(self):
>> + """Helper to create the PPAs for this test.
>>
>> + This is here only so that it can be overridden for a subsequent
>> + private PPA test, privatising the PPA before any packages
>> + are published."""
>> # Create two PPAs and add some builds to each.
>
> Will the makeArchive() call actually add builds to the PPAs?
Hrm, I'm guessing you reviewed r10333 rather than r10334, as I
actually had to refactor the way that test was setup due to a failure.
You might like to take a look at the diff for r10334. The above
comment is now in the context of the creation and adding of builds.
>
>> self.ppa_joe = self.factory.
>> self.ppa_jim = self.factory.
>>
>> + def setUp(self):
>> + """Publish some builds for the test archive."""
>> + super(
>> +
>> + self.createPPAs()
>> +
>> self.joe_builds = []
>> self.joe_
>> self.publisher
>> @@ -183,11 +191,19 @@
>> build = getUtility(
>> self.failUnles
>>
>> +
>> +class TestFindBuildCa
>> +
>> + def createPPAs(self):
>> + """Overridden to ensure that joe's ppa is privatised before any
>> + packages are published."""
>> + super(
>> + self.ppa_
>> + self.ppa_
>> +
>> def test_findBuildC
>> # If a ppa is private it will be able to have parallel builds
>> # for the one architecture.
>> - self.ppa_
>> - self.ppa_
>> next_job = removeSecurityP
>> build = getUtility(
>> self.failUnles
>>
>
>> === modified file 'lib/lp/
>> --- lib/lp/
>> +++ lib/lp/
| Guilherme Salgado (salgado) wrote : | # |
On Fri, 2010-02-19 at 13:42 +0000, Michael Nelson wrote:
> On Fri, Feb 19, 2010 at 2:06 PM, Guilherme Salgado
> <email address hidden> wrote:
> > Review: Approve code
> > Hi Michael,
> >
> > This is a very nice branch; thanks a lot for changing the tests to rely
> > on less sample data. I only have a few remarks, but it's good to go.
> >
>
> Thanks Guilherme. One note below.
>
> > review approve code
> >
> > On Fri, 2010-02-19 at 11:48 +0000, Michael Nelson wrote:
> ...
> >> === modified file 'lib/lp/
> >> --- lib/lp/
> >> +++ lib/lp/
> >> @@ -119,14 +119,22 @@
> >> build.builder = self.builders[
> >> count += 1
> >>
> >> - def setUp(self):
> >> - """Publish some builds for the test archive."""
> >> - super(TestFindB
> >> + def createPPAs(self):
> >> + """Helper to create the PPAs for this test.
> >>
> >> + This is here only so that it can be overridden for a subsequent
> >> + private PPA test, privatising the PPA before any packages
> >> + are published."""
> >> # Create two PPAs and add some builds to each.
> >
> > Will the makeArchive() call actually add builds to the PPAs?
>
> Hrm, I'm guessing you reviewed r10333 rather than r10334, as I
> actually had to refactor the way that test was setup due to a failure.
> You might like to take a look at the diff for r10334. The above
> comment is now in the context of the creation and adding of builds.
Yeah, I've reviewed the diff that was sent by email together with the
m-p notification. I'll file a bug asking for an email to be sent when
there's a new revision added to a branch for with a m-p exists.
Anyway, I've just checked the diff for f10334 and it looks good.

This is the second branch in a series to refactor soyuz tests after fixing bug 506203.
The MP for the branch that actually fixed the bug is at:
https:/ /code.edge. launchpad. net/~michael. nelson/ launchpad/ 506203- ppa-privatisati on-check/ +merge/ 19415
The fix ensures that the privacy of a PPA cannot be altered once it has packages published. Unfortunately most of our test infrastructure does exactly that (switches the privacy to do a few tests and then switches it back).
The complete test breakages are as follows: pastebin. ubuntu. com/378292/
http://
This branch fixes:
bin/test -vv -t TestPPAHtaccess TokenGeneration -t TestFindBuildCa ndidatePrivateP PA -t CopyPackageTestCase -t TestPPABinaryExpiry -t TestPopulateArc hiveScript -t TestPublishDistro
Thanks.