← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~ilasc/launchpad:multiple-tracks-charm-recipe into launchpad:master

 

Ioana Lasc has proposed merging ~ilasc/launchpad:multiple-tracks-charm-recipe into launchpad:master.

Commit message:
Enable multiple tracks for a single charm recipe

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #1968185 in Launchpad itself: "Enable a single charm recipe to be pushed to multiple, different, tracks/channels"
  https://bugs.launchpad.net/launchpad/+bug/1968185

For more details, see:
https://code.launchpad.net/~ilasc/launchpad/+git/launchpad/+merge/423161
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~ilasc/launchpad:multiple-tracks-charm-recipe into launchpad:master.
diff --git a/lib/lp/snappy/validators/channels.py b/lib/lp/snappy/validators/channels.py
index 28a1fc0..91755be 100644
--- a/lib/lp/snappy/validators/channels.py
+++ b/lib/lp/snappy/validators/channels.py
@@ -34,10 +34,6 @@ def channels_validator(channels):
     # XXX cjwatson 2018-05-08: These are slightly arbitrary restrictions,
     # but they make the UI much simpler.
 
-    if len(tracks) != 1:
-        message = _("Channels must belong to the same track.")
-        raise LaunchpadValidationError(structured(message))
-
     if len(branches) != 1:
         message = _("Channels must belong to the same branch.")
         raise LaunchpadValidationError(structured(message))
diff --git a/lib/lp/snappy/validators/tests/test_channels.py b/lib/lp/snappy/validators/tests/test_channels.py
index 6e3cda8..259edb7 100644
--- a/lib/lp/snappy/validators/tests/test_channels.py
+++ b/lib/lp/snappy/validators/tests/test_channels.py
@@ -19,9 +19,7 @@ class TestChannelsValidator(TestCaseWithFactory):
         self.assertTrue(channels_validator(['beta', 'edge']))
 
     def test_channels_validator_multiple_tracks(self):
-        self.assertRaises(
-            LaunchpadValidationError, channels_validator,
-            ['1.1/stable', '2.1/edge'])
+        self.assertTrue(channels_validator(['1.1/stable', '2.1/edge']))
 
     def test_channels_validator_multiple_branches(self):
         self.assertRaises(