Previous topic

The cinder.tests.test_versions Module

Next topic

The cinder.tests.test_volume_types Module

This Page

Psst... hey. You're reading the latest content, but it might be out of sync with code. You can read Cinder 2011.2 docs or all OpenStack docs too.

The cinder.tests.test_volume Module

Tests for Volume Code.

class DriverTestCase(methodName='runTest')

Bases: cinder.test.TestCase

Base Test class for Drivers.

driver_name = 'cinder.volume.driver.FakeBaseDriver'
fake_get_target(obj, iqn)
setUp()
tearDown()
class ISCSITestCase(methodName='runTest')

Bases: cinder.tests.test_volume.DriverTestCase

Test Case for ISCSIDriver

driver_name = 'cinder.volume.driver.ISCSIDriver'
test_check_for_export_with_no_volume()
class VolumeDriverTestCase(methodName='runTest')

Bases: cinder.tests.test_volume.DriverTestCase

Test case for VolumeDriver

driver_name = 'cinder.volume.driver.VolumeDriver'
test_delete_busy_volume()

Test deleting a busy volume.

class VolumePolicyTestCase(methodName='runTest')

Bases: cinder.test.TestCase

setUp()
tearDown()
test_check_policy()
test_check_policy_with_target()
class VolumeTestCase(methodName='runTest')

Bases: cinder.test.TestCase

Test Case for volumes.

fake_get_target(obj, iqn)
setUp()
tearDown()
test_begin_roll_detaching_volume()

Test begin_detaching and roll_detaching functions.

test_can_delete_errored_snapshot()

Test snapshot can be created and deleted.

test_cant_delete_volume_in_use()

Test volume can’t be deleted in invalid stats.

test_cant_delete_volume_with_snapshots()

Test volume can’t be deleted with dependent snapshots.

test_concurrent_volumes_get_different_targets()

Ensure multiple concurrent volumes get different targets.

test_copy_volume_to_image_exception()
test_copy_volume_to_image_status_available()
test_copy_volume_to_image_status_use()
test_create_delete_snapshot()

Test snapshot can be created and deleted.

test_create_delete_volume()

Test volume can be created and deleted.

test_create_delete_volume_with_metadata()

Test volume can be created with metadata and deleted.

test_create_snapshot_force()

Test snapshot in use can be created forcibly.

test_create_volume_from_exact_sized_image()

Verify that an image which is exactly the same size as the volume, will work correctly.

test_create_volume_from_image_exception()

Verify that create volume from image, the volume status is ‘downloading’.

test_create_volume_from_image_status_available()

Verify that before copying image to volume, it is in available state.

test_create_volume_from_image_status_downloading()

Verify that before copying image to volume, it is in downloading state.

test_create_volume_from_oversized_image()

Verify that an image which is too big will fail correctly.

test_create_volume_from_snapshot()

Test volume can be created from a snapshot.

test_create_volume_int_size()

Test volume creation with int size.

test_create_volume_string_size()

Test volume creation with string size.

test_create_volume_usage_notification()

Ensure create volume generates appropriate usage notification

test_create_volume_with_bad_size()
test_delete_busy_snapshot()

Test snapshot can be created and deleted.

test_delete_busy_volume()

Test volume survives deletion if driver reports it as busy.

test_force_delete_volume()

Test volume can be forced to delete.

test_multi_node()
test_run_attach_detach_volume()

Make sure volume can be attached and detached from instance.

test_too_big_volume()

Ensure failure if a too large of a volume is requested.