← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:fix-archive-file-deeper-history into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:fix-archive-file-deeper-history into launchpad:master.

Commit message:
Fix archive expiry tests to not create bad ArchiveFile combinations

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/437928

There may be only one non-superseded `ArchiveFile` row for a given path in a given archive at any one time.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:fix-archive-file-deeper-history into launchpad:master.
diff --git a/lib/lp/soyuz/scripts/tests/test_expire_archive_files.py b/lib/lp/soyuz/scripts/tests/test_expire_archive_files.py
index 63c85b4..b8c9a16 100644
--- a/lib/lp/soyuz/scripts/tests/test_expire_archive_files.py
+++ b/lib/lp/soyuz/scripts/tests/test_expire_archive_files.py
@@ -245,7 +245,8 @@ class ArchiveExpiryCommonTests:
         self.factory.makeArchiveFile(
             archive=self.archive,
             container="release:",
-            path="dists/%s/Release" % pkg4.distroseries.getSuite(pkg4.pocket),
+            path="dists/%s/Release"
+            % self.archive2.distribution.currentseries.getSuite(pkg4.pocket),
             library_file=af.library_file,
         )
 
@@ -290,7 +291,8 @@ class ArchiveExpiryCommonTests:
         self.factory.makeArchiveFile(
             archive=self.archive,
             container="release:",
-            path="dists/%s/Release" % pkg5.distroseries.getSuite(pkg5.pocket),
+            path="dists/%s/Release"
+            % self.archive2.distribution.currentseries.getSuite(pkg5.pocket),
             library_file=af.library_file,
             date_removed=self.under_threshold_date,
         )