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
=== modified file 'lib/lp/soyuz/scripts/tests/test_copypackage.py'
--- lib/lp/soyuz/scripts/tests/test_copypackage.py 2010-05-26 08:54:17 +0000
+++ lib/lp/soyuz/scripts/tests/test_copypackage.py 2010-06-09 15:03:41 +0000
@@ -2642,6 +2642,36 @@
2642 checker.checkCopy(test2_source, warty,2642 checker.checkCopy(test2_source, warty,
2643 PackagePublishingPocket.RELEASE))2643 PackagePublishingPocket.RELEASE))
26442644
2645 def testCopyingPackageTwice(self):
2646 joe = self.factory.makePerson(email='joe@example.com')
2647 ubuntu = getUtility(IDistributionSet).getByName('ubuntu')
2648 warty = ubuntu.getSeries('warty')
2649 test_publisher = self.getTestPublisher(warty)
2650 test_publisher.addFakeChroots(warty)
2651 dest_ppa = self.factory.makeArchive(
2652 distribution=ubuntu, owner=joe, purpose=ArchivePurpose.PPA,
2653 name='test1')
2654 src_ppa = self.factory.makeArchive(
2655 distribution=ubuntu, owner=joe, purpose=ArchivePurpose.PPA,
2656 name='test2')
2657 source = test_publisher.getPubSource(
2658 sourcename='test-source', version='1.0-1',
2659 distroseries=warty, archive=src_ppa,
2660 pocket=PackagePublishingPocket.RELEASE,
2661 status=PackagePublishingStatus.PUBLISHED,
2662 section='misc')
2663 binaries = test_publisher.getPubBinaries(
2664 pub_source=source, distroseries=warty, archive=src_ppa,
2665 pocket=PackagePublishingPocket.RELEASE,
2666 status=PackagePublishingStatus.PUBLISHED)
2667 self.layer.txn.commit()
2668 do_copy(
2669 [source], dest_ppa, warty, PackagePublishingPocket.RELEASE,
2670 include_binaries=False)
2671 do_copy(
2672 [source], dest_ppa, warty, PackagePublishingPocket.RELEASE,
2673 include_binaries=True)
2674
26452675
2646def test_suite():2676def test_suite():
2647 return unittest.TestLoader().loadTestsFromName(__name__)2677 return unittest.TestLoader().loadTestsFromName(__name__)