def test_generate_tasks_after_run(self): rollout = Rollout({}) rollout.save() create_task(rollout) rollout.rollout() self.assertRaises(Exception, rollout.generate_tasks)
def test_single_task_rollback(self): rollout = Rollout({}) rollout.save() root = create_task(rollout, TestTaskFail) rollout.rollout() self.assertRun(root) self.assertReverted(root)
def test_single_task_rollout(self): rollout = Rollout({}) rollout.save() root = create_task(rollout) rollout.rollout() self.assertRun(root) self.assertNotReverted(root)
def _test_exec_rollout(self, exec_cls): rollout = Rollout({}) rollout.save() task1 = create_task(rollout) task2 = create_task(rollout) task3 = create_task(rollout) task4 = create_task(rollout) root = create_task(rollout, exec_cls, [task1, task2, task3, task4]) rollout.rollout() # Do not assert parents or root is run since otherwise we'd have to # override their call methods for task in task1, task2, task3, task4: self.assertRun(task) self.assertNotReverted(task)