Example #1
0
 def test_lvremove(self):
     '''
     Test to remove a given existing logical volume
     from a named existing volume group
     '''
     mock = MagicMock(return_value='A')
     with patch.dict(linux_lvm.__salt__, {'cmd.run': mock}):
         self.assertEqual(linux_lvm.lvremove('', ''), 'A')
Example #2
0
 def test_lvremove(self):
     '''
     Test to remove a given existing logical volume
     from a named existing volume group
     '''
     mock = MagicMock(return_value='A')
     with patch.dict(linux_lvm.__salt__, {'cmd.run': mock}):
         self.assertEqual(linux_lvm.lvremove('', ''), 'A')
Example #3
0
 def test_lvremove(self):
     """
     Test to remove a given existing logical volume
     from a named existing volume group
     """
     mock = MagicMock(return_value="A")
     with patch.dict(linux_lvm.__salt__, {"cmd.run": mock}):
         self.assertEqual(linux_lvm.lvremove("", ""), "A")
Example #4
0
 def test_lvremove(self):
     """
     Test to remove a given existing logical volume
     from a named existing volume group
     """
     mock = MagicMock(
         return_value={
             "retcode": 0,
             "stdout": '  Logical volume "lvtest" successfully removed',
         })
     with patch.dict(linux_lvm.__salt__, {"cmd.run_all": mock}):
         self.assertEqual(
             linux_lvm.lvremove("fakelv", "fakevg"),
             'Logical volume "fakelv" successfully removed',
         )