Пример #1
0
 def test__disable_secure_boot_true(self, func_get_secure_boot_mode,
                                    func_set_secure_boot_mode):
     func_get_secure_boot_mode.return_value = True
     with task_manager.acquire(self.context, self.node.uuid,
                               shared=False) as task:
         returned_state = ilo_deploy._disable_secure_boot(task)
         func_get_secure_boot_mode.assert_called_once_with(task)
         func_set_secure_boot_mode.assert_called_once_with(task, False)
     self.assertTrue(returned_state)
Пример #2
0
 def test__disable_secure_boot_true(self,
                                    func_get_secure_boot_mode,
                                    func_set_secure_boot_mode):
     func_get_secure_boot_mode.return_value = True
     with task_manager.acquire(self.context, self.node.uuid,
                               shared=False) as task:
         returned_state = ilo_deploy._disable_secure_boot(task)
         func_get_secure_boot_mode.assert_called_once_with(task)
         func_set_secure_boot_mode.assert_called_once_with(task, False)
     self.assertTrue(returned_state)
Пример #3
0
 def test__disable_secure_boot_exception(self, func_get_secure_boot_mode,
                                         exception_mock, mock_log):
     with task_manager.acquire(self.context, self.node.uuid,
                               shared=False) as task:
         exception_mock.IloOperationNotSupported = Exception
         func_get_secure_boot_mode.side_effect = Exception
         returned_state = ilo_deploy._disable_secure_boot(task)
         func_get_secure_boot_mode.assert_called_once_with(task)
         self.assertTrue(mock_log.called)
     self.assertFalse(returned_state)
Пример #4
0
 def test__disable_secure_boot_exception(self,
                                         func_get_secure_boot_mode,
                                         exception_mock,
                                         mock_log):
     with task_manager.acquire(self.context, self.node.uuid,
                               shared=False) as task:
         exception_mock.IloOperationNotSupported = Exception
         func_get_secure_boot_mode.side_effect = Exception
         returned_state = ilo_deploy._disable_secure_boot(task)
         func_get_secure_boot_mode.assert_called_once_with(task)
         self.assertTrue(mock_log.called)
     self.assertFalse(returned_state)