Merge lp:~stevenk/launchpad/copy-package-twice-failure into lp:launchpad

Proposed by Julian Edwards
Status: Work in progress
Proposed branch: lp:~stevenk/launchpad/copy-package-twice-failure
Merge into: lp:launchpad
Diff against target: 40 lines (+30/-0)
1 file modified
lib/lp/soyuz/scripts/tests/test_copypackage.py (+30/-0)
To merge this branch: bzr merge lp:~stevenk/launchpad/copy-package-twice-failure
Reviewer Review Type Date Requested Status
Canonical Launchpad Engineering Pending
Review via email: mp+27168@code.launchpad.net
To post a comment you must log in.

Unmerged revisions

10964. By Steve Kowalik

Add first shot test at reproducing bug 556839

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/soyuz/scripts/tests/test_copypackage.py'
2--- lib/lp/soyuz/scripts/tests/test_copypackage.py 2010-05-26 08:54:17 +0000
3+++ lib/lp/soyuz/scripts/tests/test_copypackage.py 2010-06-09 15:03:41 +0000
4@@ -2642,6 +2642,36 @@
5 checker.checkCopy(test2_source, warty,
6 PackagePublishingPocket.RELEASE))
7
8+ def testCopyingPackageTwice(self):
9+ joe = self.factory.makePerson(email='joe@example.com')
10+ ubuntu = getUtility(IDistributionSet).getByName('ubuntu')
11+ warty = ubuntu.getSeries('warty')
12+ test_publisher = self.getTestPublisher(warty)
13+ test_publisher.addFakeChroots(warty)
14+ dest_ppa = self.factory.makeArchive(
15+ distribution=ubuntu, owner=joe, purpose=ArchivePurpose.PPA,
16+ name='test1')
17+ src_ppa = self.factory.makeArchive(
18+ distribution=ubuntu, owner=joe, purpose=ArchivePurpose.PPA,
19+ name='test2')
20+ source = test_publisher.getPubSource(
21+ sourcename='test-source', version='1.0-1',
22+ distroseries=warty, archive=src_ppa,
23+ pocket=PackagePublishingPocket.RELEASE,
24+ status=PackagePublishingStatus.PUBLISHED,
25+ section='misc')
26+ binaries = test_publisher.getPubBinaries(
27+ pub_source=source, distroseries=warty, archive=src_ppa,
28+ pocket=PackagePublishingPocket.RELEASE,
29+ status=PackagePublishingStatus.PUBLISHED)
30+ self.layer.txn.commit()
31+ do_copy(
32+ [source], dest_ppa, warty, PackagePublishingPocket.RELEASE,
33+ include_binaries=False)
34+ do_copy(
35+ [source], dest_ppa, warty, PackagePublishingPocket.RELEASE,
36+ include_binaries=True)
37+
38
39 def test_suite():
40 return unittest.TestLoader().loadTestsFromName(__name__)