Ejemplo n.º 1
0
 def test_notify_deployment(self, notify_checker):
     NailgunReceiver._notify(self.task, "done", "Test error.", "123",
                             self.task.uuid)
     notify_checker.assert_called_with("done",
                                       u'Test error.',
                                       self.task.cluster_id,
                                       node_id="123",
                                       task_uuid=self.task.uuid)
Ejemplo n.º 2
0
 def test_notify_provision_sub_task(self, notify_checker):
     sub_task = self.env.create_task(name=consts.TASK_NAMES.provision,
                                     status=consts.TASK_STATUSES.ready,
                                     cluster_id=self.cluster.id,
                                     parent_id=self.task.id)
     NailgunReceiver._notify(sub_task, "done", "Test error.", "123",
                             sub_task.uuid)
     self.assertEqual(0, notify_checker.call_count)
Ejemplo n.º 3
0
 def test_notify_deployment_sub_task(self, notify_checker):
     sub_task = self.env.create_task(name=consts.TASK_NAMES.deployment,
                                     status=consts.TASK_STATUSES.ready,
                                     cluster_id=self.cluster.id,
                                     parent_id=self.task.id)
     NailgunReceiver._notify(sub_task, "done", "Test error.", "123",
                             sub_task.uuid)
     notify_checker.assert_called_with("done",
                                       u'Test error.',
                                       sub_task.cluster_id,
                                       node_id="123",
                                       task_uuid=sub_task.uuid)
Ejemplo n.º 4
0
 def test_notify_deployment(self, notify_checker):
     NailgunReceiver._notify(
         self.task,
         "done",
         "Test error.",
         "123",
         self.task.uuid
     )
     notify_checker.assert_called_with(
         "done",
         u'Test error.',
         self.task.cluster_id,
         node_id="123",
         task_uuid=self.task.uuid
     )
Ejemplo n.º 5
0
 def test_notify_provision_sub_task(self, notify_checker):
     sub_task = self.env.create_task(
         name=consts.TASK_NAMES.provision,
         status=consts.TASK_STATUSES.ready,
         cluster_id=self.cluster.id,
         parent_id=self.task.id
     )
     NailgunReceiver._notify(
         sub_task,
         "done",
         "Test error.",
         "123",
         sub_task.uuid
     )
     self.assertEqual(0, notify_checker.call_count)
Ejemplo n.º 6
0
 def test_notify_deployment_sub_task(self, notify_checker):
     sub_task = self.env.create_task(
         name=consts.TASK_NAMES.deployment,
         status=consts.TASK_STATUSES.ready,
         cluster_id=self.cluster.id,
         parent_id=self.task.id
     )
     NailgunReceiver._notify(
         sub_task,
         "done",
         "Test error.",
         "123",
         sub_task.uuid
     )
     notify_checker.assert_called_with(
         "done",
         u'Test error.',
         sub_task.cluster_id,
         node_id="123",
         task_uuid=sub_task.uuid
     )