Merge lp:~rvb/maas-test/support-utopic into lp:maas-test

Proposed by Raphaël Badin
Status: Merged
Approved by: Raphaël Badin
Approved revision: 152
Merged at revision: 152
Proposed branch: lp:~rvb/maas-test/support-utopic
Merge into: lp:maas-test
Diff against target: 16 lines (+5/-1)
1 file modified
maastest/tests/test_utils.py (+5/-1)
To merge this branch: bzr merge lp:~rvb/maas-test/support-utopic
Reviewer Review Type Date Requested Status
Julian Edwards (community) Approve
Review via email: mp+217260@code.launchpad.net

Commit message

Fix test to cope with post-Trusty series.

To post a comment you must log in.
Revision history for this message
Julian Edwards (julian-edwards) wrote :

OK for now but it will break when codenames get to z. But then there's probably a whole lot more distro needs to worry about before we do :)

review: Approve
Revision history for this message
Raphaël Badin (rvb) wrote :

> OK for now but it will break when codenames get to z. But then there's
> probably a whole lot more distro needs to worry about before we do :)

Well, if `distro_info.UbuntuDistroInfo().supported(result="codename")` still does the right thing when we get to 'z', this won't break.

Revision history for this message
Julian Edwards (julian-edwards) wrote :

This is the line that will break:

 supported_maas_series = supported[supported.index('trusty'):]

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'maastest/tests/test_utils.py'
2--- maastest/tests/test_utils.py 2014-04-09 10:26:58 +0000
3+++ maastest/tests/test_utils.py 2014-04-25 15:23:28 +0000
4@@ -272,7 +272,11 @@
5 class TestGetSupportedMAASSeries(testtools.TestCase):
6
7 def test_get_supported_maas_series_return_series(self):
8- self.assertEqual(['trusty'], utils.get_supported_maas_series())
9+ supported = (
10+ distro_info.UbuntuDistroInfo().supported(result="codename"))
11+ supported_maas_series = supported[supported.index('trusty'):]
12+ self.assertEqual(
13+ supported_maas_series, utils.get_supported_maas_series())
14
15
16 class TestExtractMAPIPMapping(testtools.TestCase):

Subscribers

People subscribed via source and target branches