This Page

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

The nova.tests.test_compute Module

Tests For Compute

class nova.tests.test_compute.ComputeTestCase(methodName='runTest')

Bases: nova.test.TestCase

Test case for compute

setUp()
test_agent_update()

Ensure instance can have its agent updated

test_ajax_console()

Make sure we can get console output from instance

test_console_output()

Make sure we can get console output from instance

test_create_instance_associates_config_drive()

Make sure create associates a config drive.

test_create_instance_associates_security_groups()

Make sure create associates security groups

test_create_instance_defaults_display_name()

Verify that an instance cannot be created without a display_name.

test_create_instance_with_img_ref_associates_config_drive()

Make sure create associates a config drive.

test_create_instance_with_invalid_security_group_raises()
test_default_hostname_generator()
test_destroy_instance_disassociates_security_groups()

Make sure destroying disassociates security groups

test_destroy_security_group_disassociates_instances()

Make sure destroying security groups disassociates instances

test_finish_resize()

Contrived test to ensure finish_resize doesn’t raise anything

test_finish_revert_resize()

Ensure that the flavor is reverted to the original on revert

test_get_all_by_flavor()

Test searching instances by image

test_get_all_by_image()

Test searching instances by image

test_get_all_by_instance_name_regexp()

Test searching instances by name

test_get_all_by_ip_regexp()

Test searching by Floating and Fixed IP

test_get_all_by_ipv6_regexp()

Test searching by IPv6 address

test_get_all_by_metadata()

Test searching instances by metadata

test_get_all_by_multiple_options_at_once()

Test searching by multiple options at once

test_get_all_by_name_regexp()

Test searching instances by name (display_name)

test_get_all_by_state()

Test searching instances by state

test_get_by_fixed_ip()

Test getting 1 instance by Fixed IP

test_get_by_flavor_id()
test_inject_file()

Ensure we can write a file to an instance

test_live_migration_dest_raises_exception()

Confirm exception when pre_live_migration fails.

test_live_migration_dest_raises_exception_no_volume()

Same as above test(input pattern is different)

test_live_migration_works_correctly_no_volume()

Confirm live_migration() works as expected correctly.

test_live_migration_works_correctly_with_volume()

Confirm check_for_export to confirm volume health check.

test_lock()

ensure locked instance cannot be changed

test_migrate()
test_pause()

Ensure instance can be paused

test_post_live_migration_working_correctly()

Confirm post_live_migration() works as expected correctly.

test_pre_live_migration_instance_has_no_fixed_ip()

Confirm raising exception if instance doesn’t have fixed_ip.

test_pre_live_migration_instance_has_no_volume()

Confirm log meg when instance doesn’t mount any volumes.

test_pre_live_migration_instance_has_volume()

Confirm setup_compute_volume is called when volume is mounted.

test_pre_live_migration_setup_compute_node_fail()

Confirm operation setup_compute_network() fails.

It retries and raise exception when timeout exceeded.

test_reboot()

Ensure instance can be rebooted

test_resize_down_fails()

Ensure resizing down raises and fails

test_resize_instance()

Ensure instance can be migrated/resized

test_resize_instance_notification()

Ensure notifications on instance migrate/resize

test_resize_invalid_flavor_fails()

Ensure invalid flavors raise

test_resize_same_size_fails()

Ensure invalid flavors raise

test_resize_same_source_fails()

Ensure instance fails to migrate when source and destination are the same host

test_run_instance_existing()

Ensure failure when running an instance that already exists

test_run_instance_usage_notification()

Ensure run instance generates apropriate usage notification

test_run_kill_vm()

Detect when a vm is terminated behind the scenes

test_run_terminate()

Make sure it is possible to run and terminate instance

test_run_terminate_timestamps()

Make sure timestamps are set for launched and destroyed

test_set_admin_password()

Ensure instance can have its admin password set

test_snapshot()

Ensure instance can be snapshotted

test_start()

Ensure instance can be started

test_stop()

Ensure instance can be stopped

test_suspend()

ensure instance can be suspended

test_terminate_usage_notification()

Ensure terminate_instance generates apropriate usage notification

test_update_block_device_mapping()
test_vnc_console()

Make sure we can a vnc console for an instance.

test_volume_size()
class nova.tests.test_compute.FakeTime

Bases: object

sleep(t)
nova.tests.test_compute.nop_report_driver_status(self)