Merge "Adding description for testcases - volume part1"
This commit is contained in:
commit
8ef110cf3e
|
@ -17,12 +17,14 @@ from tempest.lib import decorators
|
||||||
|
|
||||||
|
|
||||||
class VersionsTest(base.BaseVolumeTest):
|
class VersionsTest(base.BaseVolumeTest):
|
||||||
|
"""Test cinder versions"""
|
||||||
|
|
||||||
_api_version = 3
|
_api_version = 3
|
||||||
|
|
||||||
@decorators.idempotent_id('77838fc4-b49b-4c64-9533-166762517369')
|
@decorators.idempotent_id('77838fc4-b49b-4c64-9533-166762517369')
|
||||||
@decorators.attr(type='smoke')
|
@decorators.attr(type='smoke')
|
||||||
def test_list_versions(self):
|
def test_list_versions(self):
|
||||||
|
"""Test listing cinder versions"""
|
||||||
# NOTE: The version data is checked on service client side
|
# NOTE: The version data is checked on service client side
|
||||||
# with JSON-Schema validation. It is enough to just call
|
# with JSON-Schema validation. It is enough to just call
|
||||||
# the API here.
|
# the API here.
|
||||||
|
@ -30,6 +32,7 @@ class VersionsTest(base.BaseVolumeTest):
|
||||||
|
|
||||||
@decorators.idempotent_id('7f755ae2-caa9-4049-988c-331d8f7a579f')
|
@decorators.idempotent_id('7f755ae2-caa9-4049-988c-331d8f7a579f')
|
||||||
def test_show_version(self):
|
def test_show_version(self):
|
||||||
|
"Test getting cinder version details"
|
||||||
# NOTE: The version data is checked on service client side
|
# NOTE: The version data is checked on service client side
|
||||||
# with JSON-Schema validation. So we will loop through each
|
# with JSON-Schema validation. So we will loop through each
|
||||||
# version and call show version.
|
# version and call show version.
|
||||||
|
|
|
@ -58,8 +58,11 @@ class VolumesDeleteCascade(base.BaseVolumeTest):
|
||||||
|
|
||||||
@decorators.idempotent_id('994e2d40-de37-46e8-b328-a58fba7e4a95')
|
@decorators.idempotent_id('994e2d40-de37-46e8-b328-a58fba7e4a95')
|
||||||
def test_volume_delete_cascade(self):
|
def test_volume_delete_cascade(self):
|
||||||
# The case validates the ability to delete a volume
|
"""Test deleting a volume with associated snapshots
|
||||||
# with associated snapshots.
|
|
||||||
|
The case validates the ability to delete a volume
|
||||||
|
with associated snapshots.
|
||||||
|
"""
|
||||||
|
|
||||||
# Create a volume
|
# Create a volume
|
||||||
volume = self.create_volume()
|
volume = self.create_volume()
|
||||||
|
@ -78,9 +81,12 @@ class VolumesDeleteCascade(base.BaseVolumeTest):
|
||||||
@testtools.skipIf(CONF.volume.storage_protocol == 'ceph',
|
@testtools.skipIf(CONF.volume.storage_protocol == 'ceph',
|
||||||
'Skip because of Bug#1677525')
|
'Skip because of Bug#1677525')
|
||||||
def test_volume_from_snapshot_cascade_delete(self):
|
def test_volume_from_snapshot_cascade_delete(self):
|
||||||
# The case validates the ability to delete a volume with
|
"""Test deleting a volume with associated volume-associated snapshot
|
||||||
# associated snapshot while there is another volume created
|
|
||||||
# from that snapshot.
|
The case validates the ability to delete a volume with
|
||||||
|
associated snapshot while there is another volume created
|
||||||
|
from that snapshot.
|
||||||
|
"""
|
||||||
|
|
||||||
# Create a volume
|
# Create a volume
|
||||||
volume = self.create_volume()
|
volume = self.create_volume()
|
||||||
|
|
|
@ -20,6 +20,7 @@ from tempest.lib import decorators
|
||||||
|
|
||||||
|
|
||||||
class VolumesMetadataTest(base.BaseVolumeTest):
|
class VolumesMetadataTest(base.BaseVolumeTest):
|
||||||
|
"""Test volume metadata"""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def resource_setup(cls):
|
def resource_setup(cls):
|
||||||
|
@ -34,6 +35,7 @@ class VolumesMetadataTest(base.BaseVolumeTest):
|
||||||
|
|
||||||
@decorators.idempotent_id('6f5b125b-f664-44bf-910f-751591fe5769')
|
@decorators.idempotent_id('6f5b125b-f664-44bf-910f-751591fe5769')
|
||||||
def test_crud_volume_metadata(self):
|
def test_crud_volume_metadata(self):
|
||||||
|
"""Test creating, getting, updating and deleting of volume metadata"""
|
||||||
# Create metadata for the volume
|
# Create metadata for the volume
|
||||||
metadata = {"key1": "value1",
|
metadata = {"key1": "value1",
|
||||||
"key2": "value2",
|
"key2": "value2",
|
||||||
|
@ -71,6 +73,7 @@ class VolumesMetadataTest(base.BaseVolumeTest):
|
||||||
|
|
||||||
@decorators.idempotent_id('862261c5-8df4-475a-8c21-946e50e36a20')
|
@decorators.idempotent_id('862261c5-8df4-475a-8c21-946e50e36a20')
|
||||||
def test_update_show_volume_metadata_item(self):
|
def test_update_show_volume_metadata_item(self):
|
||||||
|
"""Test updating and getting single volume metadata item"""
|
||||||
# Update metadata item for the volume
|
# Update metadata item for the volume
|
||||||
metadata = {"key1": "value1",
|
metadata = {"key1": "value1",
|
||||||
"key2": "value2",
|
"key2": "value2",
|
||||||
|
|
|
@ -20,6 +20,7 @@ from tempest.lib import decorators
|
||||||
|
|
||||||
|
|
||||||
class VolumesTransfersTest(base.BaseVolumeTest):
|
class VolumesTransfersTest(base.BaseVolumeTest):
|
||||||
|
"""Test volume transfer"""
|
||||||
|
|
||||||
credentials = ['primary', 'alt', 'admin']
|
credentials = ['primary', 'alt', 'admin']
|
||||||
|
|
||||||
|
@ -34,6 +35,7 @@ class VolumesTransfersTest(base.BaseVolumeTest):
|
||||||
|
|
||||||
@decorators.idempotent_id('4d75b645-a478-48b1-97c8-503f64242f1a')
|
@decorators.idempotent_id('4d75b645-a478-48b1-97c8-503f64242f1a')
|
||||||
def test_create_get_list_accept_volume_transfer(self):
|
def test_create_get_list_accept_volume_transfer(self):
|
||||||
|
"""Test creating, getting, listing and accepting of volume transfer"""
|
||||||
# Create a volume first
|
# Create a volume first
|
||||||
volume = self.create_volume()
|
volume = self.create_volume()
|
||||||
self.addCleanup(self.delete_volume,
|
self.addCleanup(self.delete_volume,
|
||||||
|
@ -74,6 +76,7 @@ class VolumesTransfersTest(base.BaseVolumeTest):
|
||||||
|
|
||||||
@decorators.idempotent_id('ab526943-b725-4c07-b875-8e8ef87a2c30')
|
@decorators.idempotent_id('ab526943-b725-4c07-b875-8e8ef87a2c30')
|
||||||
def test_create_list_delete_volume_transfer(self):
|
def test_create_list_delete_volume_transfer(self):
|
||||||
|
"""Test creating, listing and deleting volume transfer"""
|
||||||
# Create a volume first
|
# Create a volume first
|
||||||
volume = self.create_volume()
|
volume = self.create_volume()
|
||||||
self.addCleanup(self.delete_volume,
|
self.addCleanup(self.delete_volume,
|
||||||
|
|
|
@ -23,6 +23,7 @@ CONF = config.CONF
|
||||||
|
|
||||||
|
|
||||||
class VolumesCloneTest(base.BaseVolumeTest):
|
class VolumesCloneTest(base.BaseVolumeTest):
|
||||||
|
"""Test volume clone"""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def skip_checks(cls):
|
def skip_checks(cls):
|
||||||
|
@ -44,6 +45,7 @@ class VolumesCloneTest(base.BaseVolumeTest):
|
||||||
|
|
||||||
@decorators.idempotent_id('9adae371-a257-43a5-9555-dc7c88e66e0e')
|
@decorators.idempotent_id('9adae371-a257-43a5-9555-dc7c88e66e0e')
|
||||||
def test_create_from_volume(self):
|
def test_create_from_volume(self):
|
||||||
|
"""Test cloning a volume with increasing size"""
|
||||||
# Creates a volume from another volume passing a size different from
|
# Creates a volume from another volume passing a size different from
|
||||||
# the source volume.
|
# the source volume.
|
||||||
src_size = CONF.volume.volume_size
|
src_size = CONF.volume.volume_size
|
||||||
|
@ -58,6 +60,7 @@ class VolumesCloneTest(base.BaseVolumeTest):
|
||||||
@decorators.idempotent_id('cbbcd7c6-5a6c-481a-97ac-ca55ab715d16')
|
@decorators.idempotent_id('cbbcd7c6-5a6c-481a-97ac-ca55ab715d16')
|
||||||
@utils.services('image')
|
@utils.services('image')
|
||||||
def test_create_from_bootable_volume(self):
|
def test_create_from_bootable_volume(self):
|
||||||
|
"""Test cloning a bootable volume"""
|
||||||
# Create volume from image
|
# Create volume from image
|
||||||
img_uuid = CONF.compute.image_ref
|
img_uuid = CONF.compute.image_ref
|
||||||
src_vol = self.create_volume(imageRef=img_uuid)
|
src_vol = self.create_volume(imageRef=img_uuid)
|
||||||
|
|
|
@ -22,6 +22,7 @@ CONF = config.CONF
|
||||||
|
|
||||||
|
|
||||||
class VolumesCloneNegativeTest(base.BaseVolumeTest):
|
class VolumesCloneNegativeTest(base.BaseVolumeTest):
|
||||||
|
"""Negative tests of volume clone"""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def skip_checks(cls):
|
def skip_checks(cls):
|
||||||
|
@ -32,6 +33,7 @@ class VolumesCloneNegativeTest(base.BaseVolumeTest):
|
||||||
@decorators.attr(type=['negative'])
|
@decorators.attr(type=['negative'])
|
||||||
@decorators.idempotent_id('9adae371-a257-43a5-459a-dc7c88e66e0e')
|
@decorators.idempotent_id('9adae371-a257-43a5-459a-dc7c88e66e0e')
|
||||||
def test_create_from_volume_decreasing_size(self):
|
def test_create_from_volume_decreasing_size(self):
|
||||||
|
"""Test cloning a volume with decreasing size will fail"""
|
||||||
# Creates a volume from another volume passing a size different from
|
# Creates a volume from another volume passing a size different from
|
||||||
# the source volume.
|
# the source volume.
|
||||||
src_size = CONF.volume.volume_size + 1
|
src_size = CONF.volume.volume_size + 1
|
||||||
|
|
|
@ -28,9 +28,11 @@ CONF = config.CONF
|
||||||
|
|
||||||
|
|
||||||
class VolumesExtendTest(base.BaseVolumeTest):
|
class VolumesExtendTest(base.BaseVolumeTest):
|
||||||
|
"""Test volume extend"""
|
||||||
|
|
||||||
@decorators.idempotent_id('9a36df71-a257-43a5-9555-dc7c88e66e0e')
|
@decorators.idempotent_id('9a36df71-a257-43a5-9555-dc7c88e66e0e')
|
||||||
def test_volume_extend(self):
|
def test_volume_extend(self):
|
||||||
|
"""Test extend a volume"""
|
||||||
# Extend Volume Test.
|
# Extend Volume Test.
|
||||||
volume = self.create_volume(imageRef=self.image_ref)
|
volume = self.create_volume(imageRef=self.image_ref)
|
||||||
extend_size = volume['size'] * 2
|
extend_size = volume['size'] * 2
|
||||||
|
@ -45,6 +47,7 @@ class VolumesExtendTest(base.BaseVolumeTest):
|
||||||
@testtools.skipUnless(CONF.volume_feature_enabled.snapshot,
|
@testtools.skipUnless(CONF.volume_feature_enabled.snapshot,
|
||||||
"Cinder volume snapshots are disabled")
|
"Cinder volume snapshots are disabled")
|
||||||
def test_volume_extend_when_volume_has_snapshot(self):
|
def test_volume_extend_when_volume_has_snapshot(self):
|
||||||
|
"""Test extending a volume which has a snapshot"""
|
||||||
volume = self.create_volume()
|
volume = self.create_volume()
|
||||||
self.create_snapshot(volume['id'])
|
self.create_snapshot(volume['id'])
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@ CONF = config.CONF
|
||||||
|
|
||||||
|
|
||||||
class VolumesGetTest(base.BaseVolumeTest):
|
class VolumesGetTest(base.BaseVolumeTest):
|
||||||
|
"""Test getting volume info"""
|
||||||
|
|
||||||
def _volume_create_get_update_delete(self, **kwargs):
|
def _volume_create_get_update_delete(self, **kwargs):
|
||||||
# Create a volume, Get it's details and Delete the volume
|
# Create a volume, Get it's details and Delete the volume
|
||||||
|
@ -118,12 +119,14 @@ class VolumesGetTest(base.BaseVolumeTest):
|
||||||
@decorators.attr(type='smoke')
|
@decorators.attr(type='smoke')
|
||||||
@decorators.idempotent_id('27fb0e9f-fb64-41dd-8bdb-1ffa762f0d51')
|
@decorators.idempotent_id('27fb0e9f-fb64-41dd-8bdb-1ffa762f0d51')
|
||||||
def test_volume_create_get_update_delete(self):
|
def test_volume_create_get_update_delete(self):
|
||||||
|
"""Test Create/Get/Update/Delete of a blank volume"""
|
||||||
self._volume_create_get_update_delete(size=CONF.volume.volume_size)
|
self._volume_create_get_update_delete(size=CONF.volume.volume_size)
|
||||||
|
|
||||||
@decorators.attr(type='smoke')
|
@decorators.attr(type='smoke')
|
||||||
@decorators.idempotent_id('54a01030-c7fc-447c-86ee-c1182beae638')
|
@decorators.idempotent_id('54a01030-c7fc-447c-86ee-c1182beae638')
|
||||||
@utils.services('image')
|
@utils.services('image')
|
||||||
def test_volume_create_get_update_delete_from_image(self):
|
def test_volume_create_get_update_delete_from_image(self):
|
||||||
|
"""Test Create/Get/Update/Delete of a volume created from image"""
|
||||||
image = self.images_client.show_image(CONF.compute.image_ref)
|
image = self.images_client.show_image(CONF.compute.image_ref)
|
||||||
min_disk = image['min_disk']
|
min_disk = image['min_disk']
|
||||||
disk_size = max(min_disk, CONF.volume.volume_size)
|
disk_size = max(min_disk, CONF.volume.volume_size)
|
||||||
|
@ -134,12 +137,14 @@ class VolumesGetTest(base.BaseVolumeTest):
|
||||||
@testtools.skipUnless(CONF.volume_feature_enabled.clone,
|
@testtools.skipUnless(CONF.volume_feature_enabled.clone,
|
||||||
'Cinder volume clones are disabled')
|
'Cinder volume clones are disabled')
|
||||||
def test_volume_create_get_update_delete_as_clone(self):
|
def test_volume_create_get_update_delete_as_clone(self):
|
||||||
|
"""Test Create/Get/Update/Delete of a cloned volume"""
|
||||||
origin = self.create_volume()
|
origin = self.create_volume()
|
||||||
self._volume_create_get_update_delete(source_volid=origin['id'],
|
self._volume_create_get_update_delete(source_volid=origin['id'],
|
||||||
size=CONF.volume.volume_size)
|
size=CONF.volume.volume_size)
|
||||||
|
|
||||||
|
|
||||||
class VolumesSummaryTest(base.BaseVolumeTest):
|
class VolumesSummaryTest(base.BaseVolumeTest):
|
||||||
|
"""Test volume summary"""
|
||||||
|
|
||||||
_api_version = 3
|
_api_version = 3
|
||||||
min_microversion = '3.12'
|
min_microversion = '3.12'
|
||||||
|
@ -147,6 +152,7 @@ class VolumesSummaryTest(base.BaseVolumeTest):
|
||||||
|
|
||||||
@decorators.idempotent_id('c4f2431e-4920-4736-9e00-4040386b6feb')
|
@decorators.idempotent_id('c4f2431e-4920-4736-9e00-4040386b6feb')
|
||||||
def test_show_volume_summary(self):
|
def test_show_volume_summary(self):
|
||||||
|
"""Test showing volume summary"""
|
||||||
volume_summary = \
|
volume_summary = \
|
||||||
self.volumes_client.show_volume_summary()['volume-summary']
|
self.volumes_client.show_volume_summary()['volume-summary']
|
||||||
for key in ['total_size', 'total_count']:
|
for key in ['total_size', 'total_count']:
|
||||||
|
|
Loading…
Reference in New Issue