From 227299cdbfc6cbf2f7d488caa72afe3b76de31eb Mon Sep 17 00:00:00 2001 From: Jim Rollenhagen Date: Wed, 11 Jun 2014 11:07:13 -0700 Subject: 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 --- ironic_python_agent/tests/extensions/standby.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ironic_python_agent/tests/extensions') 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 -- cgit v1.2.1