The nova.tests.test_instance_types Module

Unit Tests for instance types code

class InstanceTypeFilteringTest(methodName='runTest')

Bases: nova.test.TestCase

Test cases for the filter option available for instance_type_get_all

assertFilterResults(filters, expected)
setUp()
test_min_memory_mb_AND_root_gb_filter()

Exclude everything but large and xlarge which have >= 80 GB

test_min_memory_mb_filter()

Exclude tiny instance which is 512 MB

test_min_root_gb_filter()

Exclude everything but large and xlarge which have >= 80 GB

test_no_filters()
class InstanceTypeTestCase(methodName='runTest')

Bases: nova.test.TestCase

Test cases for instance type code

test_can_read_deleted_types_using_flavor_id()

Ensure deleted instance types can be read when querying flavor_id

test_duplicate_flavorids_fail()

Ensures that flavorid duplicates raise InstanceTypeCreateFailed

test_duplicate_names_fail()

Ensures that name duplicates raise InstanceTypeCreateFailed

test_get_all_instance_types()

Ensures that all instance types can be retrieved

test_instance_type_create_then_delete()

Ensure instance types can be created

test_instance_type_create_with_special_characters()

Ensure instance types raises InvalidInput for invalid characters

test_instance_type_get_by_None_name_returns_default()

Ensure get by name returns default flavor with no name

test_invalid_create_args_should_fail()

Ensures that instance type creation fails with invalid args

test_non_existent_inst_type_shouldnt_delete()

Ensures that instance type creation fails with invalid args

test_read_deleted_false_converting_flavorid()

Ensure deleted instance types are not returned when not needed (for example when creating a server and attempting to translate from flavorid to instance_type_id.

test_will_get_instance_by_flavor_id()
test_will_get_instance_type_by_id()
test_will_list_deleted_type_for_active_instance()

Ensure deleted instance types with active instances can be read

test_will_not_destroy_with_no_name()

Ensure destroy said path of no name raises error

test_will_not_get_bad_default_instance_type()

ensures error raised on bad default instance type

test_will_not_get_instance_by_unknown_flavor_id()

Ensure get by flavor raises error with wrong flavorid

test_will_not_get_instance_type_by_unknown_id()

Ensure get by name returns default flavor with no name

test_will_not_get_instance_type_with_bad_id()

Ensure get by name returns default flavor with bad name

test_will_not_get_instance_type_with_bad_name()

Ensure get by name returns default flavor with bad name

Previous topic

The nova.tests.test_imagecache Module

Next topic

The nova.tests.test_instance_types_extra_specs Module

This Page