Skip to content

Commit

Permalink
Fix unit test for 'remove_lvm_physical_volume'
Browse files Browse the repository at this point in the history
This PR modified the call to no longer use 'Popen', but it was
missing the corresponding fix in the unit test for said function.
  • Loading branch information
lmlg committed Sep 20, 2021
1 parent 61244f6 commit c2ed6fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/contrib/storage/test_linux_storage_lvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ def test_deactivate_lvm_volume_groups(self, ls_vg):

def test_remove_lvm_physical_volume(self):
"""It removes LVM physical volume signatures from block device"""
with patch(STORAGE_LINUX_LVM + '.Popen') as popen:
with patch(STORAGE_LINUX_LVM + '.check_call') as popen:
lvm.remove_lvm_physical_volume('/dev/foo')
popen.assert_called_with(['pvremove', '-ff', '/dev/foo'], stdin=-1)
popen.assert_called_with(['pvremove', '-ff', '--yes', '/dev/foo'])

def test_is_physical_volume(self):
"""It properly reports block dev is an LVM PV"""
Expand Down

0 comments on commit c2ed6fc

Please sign in to comment.