summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-09-07 20:59:40 +0000
committerGerrit Code Review <review@openstack.org>2012-09-07 20:59:40 +0000
commit7741ac15e6304776488dde29fff4e84e96378269 (patch)
treeaf10c39a25347870a38c86facdbd371e277fe22e /nova/tests
parent7c1681bb5ca655f4b846ce1a9c18509f79519d94 (diff)
parent3379e821f715d6c63af3f0e96d276ca3f3ff24ca (diff)
Merge "Use volume driver specific exceptions"
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/test_storwize_svc.py18
-rw-r--r--nova/tests/test_volume.py2
2 files changed, 10 insertions, 10 deletions
diff --git a/nova/tests/test_storwize_svc.py b/nova/tests/test_storwize_svc.py
index e735bf66c..ac17f0968 100644
--- a/nova/tests/test_storwize_svc.py
+++ b/nova/tests/test_storwize_svc.py
@@ -882,7 +882,7 @@ class StorwizeSVCDriverTestCase(test.TestCase):
# Check for missing san_ip
saved = storwize_svc.FLAGS.san_ip
storwize_svc.FLAGS.san_ip = None
- self.assertRaises(exception.InvalidParameterValue,
+ self.assertRaises(exception.InvalidInput,
self.driver._check_flags)
storwize_svc.FLAGS.san_ip = saved
@@ -906,7 +906,7 @@ class StorwizeSVCDriverTestCase(test.TestCase):
orig_pool = getattr(storwize_svc.FLAGS, "storwize_svc_volpool_name")
no_exist_pool = "i-dont-exist-%s" % random.randint(10000, 99999)
storwize_svc.FLAGS.storwize_svc_volpool_name = no_exist_pool
- self.assertRaises(exception.InvalidParameterValue,
+ self.assertRaises(exception.InvalidInput,
self.driver.check_for_setup_error)
storwize_svc.FLAGS.storwize_svc_volpool_name = orig_pool
@@ -934,44 +934,44 @@ class StorwizeSVCDriverTestCase(test.TestCase):
saved_key = storwize_svc.FLAGS.san_private_key
storwize_svc.FLAGS.san_password = None
storwize_svc.FLAGS.san_private_key = None
- self.assertRaises(exception.InvalidParameterValue,
+ self.assertRaises(exception.InvalidInput,
self.driver._check_flags)
storwize_svc.FLAGS.san_password = saved_pass
storwize_svc.FLAGS.san_private_key = saved_key
saved = storwize_svc.FLAGS.storwize_svc_vol_vtype
storwize_svc.FLAGS.storwize_svc_vol_vtype = "invalid"
- self.assertRaises(exception.InvalidParameterValue,
+ self.assertRaises(exception.InvalidInput,
self.driver._check_flags)
storwize_svc.FLAGS.storwize_svc_vol_vtype = saved
saved = storwize_svc.FLAGS.storwize_svc_vol_rsize
storwize_svc.FLAGS.storwize_svc_vol_rsize = "invalid"
- self.assertRaises(exception.InvalidParameterValue,
+ self.assertRaises(exception.InvalidInput,
self.driver._check_flags)
storwize_svc.FLAGS.storwize_svc_vol_rsize = saved
saved = storwize_svc.FLAGS.storwize_svc_vol_warning
storwize_svc.FLAGS.storwize_svc_vol_warning = "invalid"
- self.assertRaises(exception.InvalidParameterValue,
+ self.assertRaises(exception.InvalidInput,
self.driver._check_flags)
storwize_svc.FLAGS.storwize_svc_vol_warning = saved
saved = storwize_svc.FLAGS.storwize_svc_vol_autoexpand
storwize_svc.FLAGS.storwize_svc_vol_autoexpand = "invalid"
- self.assertRaises(exception.InvalidParameterValue,
+ self.assertRaises(exception.InvalidInput,
self.driver._check_flags)
storwize_svc.FLAGS.storwize_svc_vol_autoexpand = saved
saved = storwize_svc.FLAGS.storwize_svc_vol_grainsize
storwize_svc.FLAGS.storwize_svc_vol_grainsize = str(42)
- self.assertRaises(exception.InvalidParameterValue,
+ self.assertRaises(exception.InvalidInput,
self.driver._check_flags)
storwize_svc.FLAGS.storwize_svc_vol_grainsize = saved
saved = storwize_svc.FLAGS.storwize_svc_flashcopy_timeout
storwize_svc.FLAGS.storwize_svc_flashcopy_timeout = str(601)
- self.assertRaises(exception.InvalidParameterValue,
+ self.assertRaises(exception.InvalidInput,
self.driver._check_flags)
storwize_svc.FLAGS.storwize_svc_flashcopy_timeout = saved
diff --git a/nova/tests/test_volume.py b/nova/tests/test_volume.py
index a147a3a99..0752d2b9b 100644
--- a/nova/tests/test_volume.py
+++ b/nova/tests/test_volume.py
@@ -248,7 +248,7 @@ class VolumeTestCase(test.TestCase):
self.assertEqual(vol['mountpoint'], mountpoint)
self.assertEqual(vol['instance_uuid'], instance_uuid)
- self.assertRaises(exception.NovaException,
+ self.assertRaises(exception.VolumeAttached,
self.volume.delete_volume,
self.context,
volume_id)