This Page

Psst... hey. You're reading the latest content, but it might be out of sync with code. You can read Nova 2011.1 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()
tearDown()
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_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_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_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_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_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_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_suspend()

ensure instance can be suspended

test_vnc_console()

Make sure we can a vnc console for an instance.

class nova.tests.test_compute.FakeTime

Bases: object

sleep(t)