← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:fix-dominator-channel-map into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:fix-dominator-channel-map into launchpad:master.

Commit message:
Fix channel publications in dominator tests

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

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

Broken by commit 038e321722: publications to a channel must now be in the RELEASE pocket.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:fix-dominator-channel-map into launchpad:master.
diff --git a/lib/lp/archivepublisher/tests/test_dominator.py b/lib/lp/archivepublisher/tests/test_dominator.py
index 23d5468..7d88122 100644
--- a/lib/lp/archivepublisher/tests/test_dominator.py
+++ b/lib/lp/archivepublisher/tests/test_dominator.py
@@ -1379,6 +1379,9 @@ class TestArchSpecificPublicationsCache(TestCaseWithFactory):
         if spr is None:
             spr = self.makeSPR()
         das = self.factory.makeDistroArchSeries(distroseries=distroseries)
+        pocket = (
+            PackagePublishingPocket.UPDATES if channel is None
+            else PackagePublishingPocket.RELEASE)
         bpb = self.factory.makeBinaryPackageBuild(
             source_package_release=spr, distroarchseries=das)
         bpr = self.factory.makeBinaryPackageRelease(
@@ -1387,7 +1390,7 @@ class TestArchSpecificPublicationsCache(TestCaseWithFactory):
         return removeSecurityProxy(
             self.factory.makeBinaryPackagePublishingHistory(
                 binarypackagerelease=bpr, archive=archive,
-                distroarchseries=das, pocket=PackagePublishingPocket.UPDATES,
+                distroarchseries=das, pocket=pocket,
                 status=PackagePublishingStatus.PUBLISHED, channel=channel))
 
     def test_getKey_is_consistent_and_distinguishing(self):