diff options
| author | Dmitry Tantsur <dtantsur@protonmail.com> | 2021-04-12 13:31:48 +0200 |
|---|---|---|
| committer | Dmitry Tantsur <dtantsur@protonmail.com> | 2021-04-13 19:05:04 +0200 |
| commit | b395181b1b1381ff0802744807a981df8453bc40 (patch) | |
| tree | 6715e19300430e9eb75a22224c165329792cbd0e /ironic_python_agent/tests/unit | |
| parent | 993f9a0ceb7a731677fccdce176f4faaea6ec116 (diff) | |
| download | ironic-python-agent-b395181b1b1381ff0802744807a981df8453bc40.tar.gz | |
Always fall back to sysrq when power off fails
The line we're looking for is not there when IPA is in a container, at least
for CentOS based containers. Just fall back to sysrq on errors.
Change-Id: Ie4ee605ad9c6cda58808512a563247175859c71e
Diffstat (limited to 'ironic_python_agent/tests/unit')
| -rw-r--r-- | ironic_python_agent/tests/unit/extensions/test_standby.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ironic_python_agent/tests/unit/extensions/test_standby.py b/ironic_python_agent/tests/unit/extensions/test_standby.py index 9f138e47..79b4a6ca 100644 --- a/ironic_python_agent/tests/unit/extensions/test_standby.py +++ b/ironic_python_agent/tests/unit/extensions/test_standby.py @@ -1049,9 +1049,10 @@ class TestStandbyExtension(base.IronicAgentTest): @mock.patch('ironic_python_agent.utils.execute', autospec=True) def test_run_shutdown_command_valid_poweroff_sysrq(self, execute_mock): - execute_mock.side_effect = [('', ''), ('', ''), ('', - 'Running in chroot, ignoring request.'), - ('', '')] + execute_mock.side_effect = [ + ('', ''), ('', ''), + processutils.ProcessExecutionError(''), + ('', '')] self.agent_extension._run_shutdown_command('poweroff') calls = [mock.call('hwclock', '-v', '--systohc'), |
