self.driver.client.test_fail = True
self.driver.delete_volume(test_snap)
+ def test_delete_snapshot_with_snapshot_nonexistent(self):
+ fake_snap = {
+ 'name': 'volume-21ec7341-9256-497b-97d9-ef48edcf0635',
+ 'size': 1,
+ 'volume_name': 'vol1',
+ 'id': '21ec7341-9256-497b-97d9-ef48edcf0635',
+ 'volume_id': '21ec7341-9256-497b-97d9-ef48edcf0635',
+ 'provider_auth': None,
+ 'project_id': 'project',
+ 'display_name': 'vol1',
+ 'display_description': 'test volume',
+ 'volume_type_id': None,
+ 'provider_location': None, }
+ self.driver.delete_snapshot(fake_snap)
+
def test_initialize_connection_fail(self):
-
self.driver.client.test_fail = True
self.assertRaises(exception.VolumeBackendAPIException,