Code review comment for lp://qastaging/~xnox/ubuntu-release-upgrader/lp1409555

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

On 13 January 2015 at 22:50, Brian Murray <email address hidden> wrote:
> There was a failure with the test that I've commented on in-line.
>
>> +
>> + sources_file = apt_pkg.config.find_file("Dir::Etc::sourcelist")
>
> The test was failing for me and it seems to because the sources_file isn't saved when updateSourcesList is called. This is why the other tests use self._verifySources() whcih I've switched to using for your test.
>

Hm, this could be due to environment changes. I'm developing this on Trusty.

_verifySources() is not sufficient for this test. _verifySources only
checks that "these lines are in the file", I however need to test for
"extras.ubuntu.com lines _are removed from the file_" Thus
_verifySources was passing the test for me, with or without, the
patch. I don't believe wee have done outright removal ever before
(only commenting things out).

I'll check the branch / and test on utopic/vivid in chroot to see what
is going on.

>> + self.assertEqual(open(sources_file).read(),"""deb http://archive.ubuntu.com/ubuntu gutsy main restricted
>> +deb http://archive.ubuntu.com/ubuntu gutsy-updates main restricted
>> +deb http://security.ubuntu.com/ubuntu/ gutsy-security main restricted
>> +
>> +""")
>> +
>> def test_powerpc_transition(self):
>> """
>> test transition of powerpc to ports.ubuntu.com
>>

--
Regards,

Dimitri.

« Back to merge proposal