add volume tests

negative tests for create volume

Change-Id: I81c5596dde58679f9be1dccc15b6bb70bd71f842
diff --git a/tempest/api/volume/test_volumes_negative.py b/tempest/api/volume/test_volumes_negative.py
index 3e2b6ad..02adc5d 100644
--- a/tempest/api/volume/test_volumes_negative.py
+++ b/tempest/api/volume/test_volumes_negative.py
@@ -85,6 +85,33 @@
                           size='-1', display_name=v_name, metadata=metadata)
 
     @attr(type=['negative', 'gate'])
+    def test_create_volume_with_nonexistant_volume_type(self):
+        # Should not be able to create volume with non-existant volume type
+        v_name = rand_name('Volume-')
+        metadata = {'Type': 'work'}
+        self.assertRaises(exceptions.NotFound, self.client.create_volume,
+                          size='1', volume_type=str(uuid.uuid4()),
+                          display_name=v_name, metadata=metadata)
+
+    @attr(type=['negative', 'gate'])
+    def test_create_volume_with_nonexistant_snapshot_id(self):
+        # Should not be able to create volume with non-existant snapshot
+        v_name = rand_name('Volume-')
+        metadata = {'Type': 'work'}
+        self.assertRaises(exceptions.NotFound, self.client.create_volume,
+                          size='1', snapshot_id=str(uuid.uuid4()),
+                          display_name=v_name, metadata=metadata)
+
+    @attr(type=['negative', 'gate'])
+    def test_create_volume_with_nonexistant_source_volid(self):
+        # Should not be able to create volume with non-existant source volume
+        v_name = rand_name('Volume-')
+        metadata = {'Type': 'work'}
+        self.assertRaises(exceptions.NotFound, self.client.create_volume,
+                          size='1', source_volid=str(uuid.uuid4()),
+                          display_name=v_name, metadata=metadata)
+
+    @attr(type=['negative', 'gate'])
     def test_update_volume_with_nonexistant_volume_id(self):
         v_name = rand_name('Volume-')
         metadata = {'Type': 'work'}