summaryrefslogtreecommitdiff
path: root/ironic_python_agent/tests/extensions
diff options
context:
space:
mode:
authorJim Rollenhagen <jim@jimrollenhagen.com>2014-06-11 11:07:13 -0700
committerJim Rollenhagen <jim@jimrollenhagen.com>2014-06-11 11:07:13 -0700
commit227299cdbfc6cbf2f7d488caa72afe3b76de31eb (patch)
tree5bdd8b277a792054b5378d65fe6b913e079362ce /ironic_python_agent/tests/extensions
parent263f97c0e0fe4792c5aca1ac107bc2d5bb38115d (diff)
downloadironic-python-agent-227299cdbfc6cbf2f7d488caa72afe3b76de31eb.tar.gz
Fix test_run_image
This tests an async function, where exceptions will not bubble up to the caller. So, we need to check the async result's command_status attribute in order to make sure the call succeeded. Change-Id: If8c529943acc794252778280a5fadf2c7860eb0d
Diffstat (limited to 'ironic_python_agent/tests/extensions')
-rw-r--r--ironic_python_agent/tests/extensions/standby.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/ironic_python_agent/tests/extensions/standby.py b/ironic_python_agent/tests/extensions/standby.py
index 6f5a1144..c76e2421 100644
--- a/ironic_python_agent/tests/extensions/standby.py
+++ b/ironic_python_agent/tests/extensions/standby.py
@@ -337,7 +337,9 @@ class TestStandbyExtension(test_base.BaseTestCase):
success_result = self.agent_extension.run_image('run_image')
success_result.join()
+
execute_mock.assert_called_once_with(*command)
+ self.assertEqual('SUCCEEDED', success_result.command_status)
execute_mock.reset_mock()
execute_mock.return_value = 1