Пример #1
0
 def test_reset_service_group(self):
     '''Test the ability to reset values of a service group'''
     group = ServiceGroup('GROUP')
     ser1 = Service('I1')
     action = Action(name='start', delay=3)
     action.maxretry = 5
     action.tries = 3
     action.status = DONE
     ser1.add_action(action)
     ser1.status = ERROR
     group.add_inter_dep(target=ser1)
     group.status = DEP_ERROR
     group.reset()
     self.assertEqual(group.status, NO_STATUS)
     self.assertEqual(ser1.status, NO_STATUS)
     self.assertEqual(action.status, NO_STATUS)
     self.assertEqual(action.tries, 0)
Пример #2
0
 def test_reset_service_group(self):
     '''Test the ability to reset values of a service group'''
     group = ServiceGroup('GROUP')
     ser1 = Service('I1')
     action = Action(name='start', delay=3)
     action.maxretry = 5
     action.tries = 3
     action.status = DONE
     ser1.add_action(action)
     ser1.status = ERROR
     group.add_inter_dep(target=ser1)
     group.status = DEP_ERROR
     group.reset()
     self.assertEqual(group.status, NO_STATUS)
     self.assertEqual(ser1.status, NO_STATUS)
     self.assertEqual(action.status, NO_STATUS)
     self.assertEqual(action.tries, 0)