def test_delete_volume_raise_bad_name_error(self):
     self._prepare_delete_volume_with_no_snapshots()
     self.mediator.client.cmd.vol_delete.side_effect = [
         xcli_errors.VolumeBadNameError("", "vol", "")
     ]
     with self.assertRaises(array_errors.ObjectNotFoundError):
         self.mediator.delete_volume("vol-wwn")
Exemplo n.º 2
0
 def test_expand_volume_not_found_error(self):
     self._expand_volume_vol_resize_errors(returned_error=xcli_errors.VolumeBadNameError("", "", ""),
                                           expected_exception=array_errors.ObjectNotFoundError)
Exemplo n.º 3
0
 def test_delete_snapshot_raise_bad_name_error(self):
     self.mediator.client.cmd.snapshot_delete.side_effect = [xcli_errors.VolumeBadNameError("", "snapshot", "")]
     with self.assertRaises(array_errors.ObjectNotFoundError):
         self.mediator.delete_snapshot("snapshot-wwn")
Exemplo n.º 4
0
 def test_copy_to_existing_volume_from_snapshot_failed_volume_not_found(self):
     self._test_copy_to_existing_volume_from_snapshot_error(xcli_errors.VolumeBadNameError("", "", ""),
                                                            array_errors.ObjectNotFoundError)
 def test_delete_volume_return_bad_name_error(self):
     self.mediator.client.cmd.vol_delete.side_effect = [xcli_errors.VolumeBadNameError("", "vol", "")]
     with self.assertRaises(array_errors.VolumeNotFoundError):
         self.mediator.delete_volume("vol-wwn")