Merge "Redfish: Adds test case for 'get_supported_boot_mode'"
This commit is contained in:
commit
44cbff50f4
|
@ -667,6 +667,17 @@ class RedfishOperationsTestCase(testtools.TestCase):
|
|||
actual_val = self.rf_client.get_supported_boot_mode()
|
||||
self.assertEqual(expected_boot_val, actual_val)
|
||||
|
||||
@mock.patch.object(redfish.RedfishOperations, '_get_sushy_system')
|
||||
def test_get_supported_boot_mode_error(self, get_system_mock):
|
||||
supported_boot_mode_mock = mock.PropertyMock(
|
||||
side_effect=sushy.exceptions.SushyError)
|
||||
type(get_system_mock.return_value).supported_boot_mode = (
|
||||
supported_boot_mode_mock)
|
||||
self.assertRaisesRegex(
|
||||
exception.IloError,
|
||||
'The Redfish controller failed to get the supported boot modes.',
|
||||
self.rf_client.get_supported_boot_mode)
|
||||
|
||||
@mock.patch.object(redfish.RedfishOperations, '_get_sushy_system')
|
||||
@mock.patch.object(redfish.RedfishOperations, '_get_sushy_manager')
|
||||
def test_get_server_capabilities(self, get_manager_mock, get_system_mock):
|
||||
|
|
Loading…
Reference in New Issue