case test_kill_process_with_different_signal is not necessary

Bug #1509941 reported by ZongKai LI
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Expired
Undecided
Unassigned

Bug Description

in _test__kill_process, utils.execute has been mocked in following code:
        ...
        with mock.patch.object(utils, 'execute',
                               side_effect=exc) as mock_execute:
        ...
while in _kill_process, signal will be used in:
    ...
    utils.execute(['kill', '-%d' % kill_signal, pid],
                   run_as_root=self.run_as_root)
    ...
so indeed, no signal will be sent at all, for that, we don't need case test_kill_process_with_different_signal, and don't need signal as parameter for _test__kill_process

ZongKai LI (zongkai)
description: updated
Changed in neutron:
assignee: nobody → ZongKai LI (lzklibj)
Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

Without actual links to the files it's difficult to see what you mean but from what *I* can see, _kill_process does use "execute" and that does need to be mocked.

Changed in neutron:
status: New → Incomplete
assignee: ZongKai LI (lzklibj) → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for neutron because there has been no activity for 60 days.]

Changed in neutron:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.