Merge lp://qastaging/~brian-murray/ubuntu-release-upgrader/test-ordering into lp://qastaging/ubuntu-release-upgrader

Proposed by Brian Murray
Status: Merged
Merged at revision: 2998
Proposed branch: lp://qastaging/~brian-murray/ubuntu-release-upgrader/test-ordering
Merge into: lp://qastaging/ubuntu-release-upgrader
Diff against target: 40 lines (+5/-2)
2 files modified
DistUpgrade/DistUpgradeController.py (+2/-2)
debian/changelog (+3/-0)
To merge this branch: bzr merge lp://qastaging/~brian-murray/ubuntu-release-upgrader/test-ordering
Reviewer Review Type Date Requested Status
Barry Warsaw (community) Approve
Review via email: mp+294313@code.qastaging.launchpad.net

Description of the change

The test test_sources_list.py would fail if run by itself (with a NoDistroTemplate Exception) and would only succeed if it was run after test_dist_ugprade_fetcher_core.py. This is because test_dist_upgrade_fetcher_core.py downloads an ubuntu-release-upgrader tarball which includes Ubuntu.info and Ubuntu.mirrors from python-apt. Additionally, something in the dist upgrade fetcher test would also set the working directory to '/tmp/ubuntu-release-upgrader-XYZ' which contained the Ubuntu.* files.

Then test_sources_list.py uses DistUpgradeController which sets the following:

self.sources = SourcesList(matcherPath=".")

So when the test is run without test_dist_upgrade_fetcher_core.py we check the current directory for python apt templates and find none, so the test fails. I've resolved this by making the matcherPath dynamic and including Ubuntu.info and Ubuntu.mirrors in the tests' data directory.

To post a comment you must log in.
Revision history for this message
Barry Warsaw (barry) wrote :

Nice! :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches