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

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: 83cdaaef6e2bd83693865ace109a6d2f6e427d96
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/launchpad:fix-archive-file-deeper-history
Merge into: launchpad:master
Diff against target: 24 lines (+4/-2)
1 file modified
lib/lp/soyuz/scripts/tests/test_expire_archive_files.py (+4/-2)
Reviewer Review Type Date Requested Status
Jürgen Gmach Approve
Review via email: mp+437928@code.launchpad.net

Commit message

Fix archive expiry tests to not create bad ArchiveFile combinations

Description of the change

There may be only one non-superseded `ArchiveFile` row for a given path in a given archive at any one time.

To post a comment you must log in.
Revision history for this message
Jürgen Gmach (jugmac00) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lib/lp/soyuz/scripts/tests/test_expire_archive_files.py b/lib/lp/soyuz/scripts/tests/test_expire_archive_files.py
2index 63c85b4..b8c9a16 100644
3--- a/lib/lp/soyuz/scripts/tests/test_expire_archive_files.py
4+++ b/lib/lp/soyuz/scripts/tests/test_expire_archive_files.py
5@@ -245,7 +245,8 @@ class ArchiveExpiryCommonTests:
6 self.factory.makeArchiveFile(
7 archive=self.archive,
8 container="release:",
9- path="dists/%s/Release" % pkg4.distroseries.getSuite(pkg4.pocket),
10+ path="dists/%s/Release"
11+ % self.archive2.distribution.currentseries.getSuite(pkg4.pocket),
12 library_file=af.library_file,
13 )
14
15@@ -290,7 +291,8 @@ class ArchiveExpiryCommonTests:
16 self.factory.makeArchiveFile(
17 archive=self.archive,
18 container="release:",
19- path="dists/%s/Release" % pkg5.distroseries.getSuite(pkg5.pocket),
20+ path="dists/%s/Release"
21+ % self.archive2.distribution.currentseries.getSuite(pkg5.pocket),
22 library_file=af.library_file,
23 date_removed=self.under_threshold_date,
24 )

Subscribers

People subscribed via source and target branches

to status/vote changes: