Ejemplo n.º 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)
     )
Ejemplo n.º 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),
     )
Ejemplo n.º 3
0
 def test_run_action(self):
     assert serviceinstance.run_action(self.task, self.action)
     self.node.submit_command.assert_called_with(self.action)
Ejemplo n.º 4
0
 def test_run_action(self):
     assert serviceinstance.run_action(self.task, self.action)
     self.node.submit_command.assert_called_with(self.action)