27
27
from lp.soyuz.enums import PackagePublishingStatus
28
28
from lp.soyuz.interfaces.binarypackagebuild import IBinaryPackageBuildSet
29
from lp.soyuz.interfaces.buildpackagejob import COPY_ARCHIVE_SCORE_PENALTY
30
29
from lp.soyuz.scripts.ftpmaster import (
31
30
PackageLocationError,
702
701
# Make sure the source to be copied are the ones we expect (this
703
702
# should break in case of a sample data change/corruption).
704
703
self.assertEqual(src_names, self.expected_src_names)
706
def testRaisePriority(self):
707
# The --raise-priority option should create a copy archive
708
# with a relative_build_score of 10 to offset the -10 of copy
710
series = self.factory.makeDistroSeries()
711
archive_name = self.factory.getUniqueString('copy-archive')
712
script = self.getScript([
713
'--from-distribution', series.distribution.name,
714
'--from-suite', series.name,
715
'--to-distribution', series.distribution.name,
716
'--to-suite', series.name,
717
'--to-archive', archive_name,
718
'--to-user', series.registrant.name,
719
'--reason', 'testing!',
720
'--architecture', '386',
724
copy_archive = getUtility(IArchiveSet).getByDistroPurpose(
725
series.distribution, ArchivePurpose.COPY, archive_name)
726
self.assertIsNotNone(copy_archive, "COPY archive wasn't created")
728
COPY_ARCHIVE_SCORE_PENALTY, copy_archive.relative_build_score)