Fix wrong args to update manager
The abort update and clear breakpoints actions were using the wrong number of arguments to the update manager. This fixes that, and adds to the unit tests to detect the problem. Change-Id: I198a33c8608648c7abcafc2cfb1aefb0fb8417e6 Closes-Bug: #1668269
This commit is contained in:
parent
ce7a0ac53e
commit
d2ee6d070e
|
@ -36,7 +36,8 @@ class ClearBreakpointsAction(base.TripleOAction):
|
|||
def run(self):
|
||||
heat = self.get_orchestration_client()
|
||||
nova = self.get_compute_client()
|
||||
update_manager = PackageUpdateManager(heat, nova, self.stack_id)
|
||||
update_manager = PackageUpdateManager(
|
||||
heat, nova, self.stack_id, stack_fields={})
|
||||
update_manager.clear_breakpoints(self.refs)
|
||||
|
||||
|
||||
|
@ -48,7 +49,8 @@ class CancelStackUpdateAction(base.TripleOAction):
|
|||
def run(self):
|
||||
heat = self.get_orchestration_client()
|
||||
nova = self.get_compute_client()
|
||||
update_manager = PackageUpdateManager(heat, nova, self.stack_id)
|
||||
update_manager = PackageUpdateManager(
|
||||
heat, nova, self.stack_id, stack_fields={})
|
||||
update_manager.cancel()
|
||||
|
||||
|
||||
|
|
|
@ -39,6 +39,11 @@ class ClearBreakpointsActionTest(base.TestCase):
|
|||
self.assertEqual(None, result)
|
||||
mock_compute_client.assert_called_once()
|
||||
mock_orchestration_client.assert_called_once()
|
||||
mock_update_manager.assert_called_once_with(
|
||||
mock_orchestration_client(),
|
||||
mock_compute_client(),
|
||||
self.stack_id,
|
||||
stack_fields={})
|
||||
mock_update_manager().clear_breakpoints.assert_called_once_with(
|
||||
self.refs)
|
||||
|
||||
|
@ -62,6 +67,11 @@ class CancelStackUpdateActionTest(base.TestCase):
|
|||
self.assertEqual(None, result)
|
||||
mock_compute_client.assert_called_once()
|
||||
mock_orchestration_client.assert_called_once()
|
||||
mock_update_manager.assert_called_once_with(
|
||||
mock_orchestration_client(),
|
||||
mock_compute_client(),
|
||||
self.stack_id,
|
||||
stack_fields={})
|
||||
mock_update_manager().cancel.assert_called_once()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue