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