ironic.tests.unit.conductor.test_utils
Module¶ironic.tests.unit.conductor.test_utils.
CleanupAfterTimeoutTestCase
(*args, **kwargs)[source]¶Bases: ironic.tests.base.TestCase
ironic.tests.unit.conductor.test_utils.
ErrorHandlersTestCase
(*args, **kwargs)[source]¶Bases: ironic.tests.base.TestCase
ironic.tests.unit.conductor.test_utils.
NodePowerActionTestCase
(*args, **kwargs)[source]¶Bases: ironic.tests.unit.db.base.DbTestCase
test__can_skip_state_change_db_not_in_sync
()[source]¶Test setting node state to its present state if DB is out of sync.
Under rare conditions (see bug #1403106) database might contain stale information, make sure we fix it.
test__can_skip_state_change_different_state
()[source]¶Test setting node state to different state.
Test that we should change state if requested state is different from current state.
test__can_skip_state_change_failed_getting_state_notify
(*args, **keywargs)[source]¶Test for notification & exception when can’t get power state.
Test to make sure we generate a notification and also that an exception is raised when we can’t get the current power state.
test__can_skip_state_change_same_state
(*args, **keywargs)[source]¶Test setting node state to its present state.
Test that we don’t try to set the power state if the requested state is the same as the current state.
test_node_power_action_already_being_processed
()[source]¶Test node power action after aborted power action.
The target_power_state is expected to be None so it isn’t checked in the code. This is what happens if it is not None. (Eg, if a conductor had died during a previous power-off attempt and left the target_power_state set to states.POWER_OFF, and the user is attempting to power-off again.)
test_node_power_action_failed_getting_state
()[source]¶Test for exception when we can’t get the current power state.
test_node_power_action_failed_getting_state_notify
(*args, **keywargs)[source]¶Test for notification when we can’t get the current power state.
test_node_power_action_in_same_state
(*args, **keywargs)[source]¶Test setting node state to its present state.
Test that we don’t try to set the power state if the requested state is the same as the current state.
test_node_power_action_in_same_state_db_not_in_sync
()[source]¶Test setting node state to its present state if DB is out of sync.
Under rare conditions (see bug #1403106) database might contain stale information, make sure we fix it.
test_node_power_action_invalid_state
()[source]¶Test for exception when changing to an invalid power state.
test_node_power_action_invalid_state_notify
(*args, **keywargs)[source]¶Test for notification when changing to an invalid power state.
test_node_power_action_power_off_storage_detach
()[source]¶Test node_power_action to turn node power off and detach storage.
test_node_power_action_power_on_notify
(*args, **keywargs)[source]¶Test node_power_action to power on node and send notification.
test_node_power_action_power_on_storage_attach
()[source]¶Test node_power_action to turn node power on and attach storage.
test_node_power_action_reboot_storage_attach
()[source]¶Test node_power_action to reboot the node and attach storage.
ironic.tests.unit.conductor.test_utils.
NodeSoftPowerActionTestCase
(*args, **kwargs)[source]¶Bases: ironic.tests.unit.db.base.DbTestCase
test_node_power_action_soft_power_off
()[source]¶Test node_power_action to turn node soft power off.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.