예제 #1
0
 def test_run_action_failed(self):
     error = self.task.node.submit_command.side_effect = node.Error("Oops")
     assert not serviceinstance.run_action(self.task, self.action)
     self.task.notify.assert_called_with(self.failed)
     self.task.buffer_store.open.return_value.write.assert_called_with(
         "Node run failure for mock_task: %s" % str(error)
     )
예제 #2
0
 def test_run_action_failed(self):
     error = self.task.node.submit_command.side_effect = node.Error("Oops")
     assert not serviceinstance.run_action(self.task, self.action)
     self.task.notify.assert_called_with(self.failed)
     self.task.buffer_store.open.return_value.write.assert_called_with(
         "Node run failure for mock_task: %s" % str(error),
     )
예제 #3
0
 def test_run_action(self):
     assert serviceinstance.run_action(self.task, self.action)
     self.node.submit_command.assert_called_with(self.action)
예제 #4
0
 def test_run_action(self):
     assert serviceinstance.run_action(self.task, self.action)
     self.node.submit_command.assert_called_with(self.action)