def test_fail_if_down(self): top = make_topology(size=3, has_down_host=True) done = [] running = [] failed = [] with self.assertRaises(HostIsDown): find_next_host(Strategy.ALL, top, None, Progress(done=done, running=running, failed=failed), True, True, None, None, False)
def test_succeed_if_down_with_ignore_down_nodes(self): top = make_topology(size=3, has_down_host=True) done = [] running = [] failed = [] while True: h = find_next_host(Strategy.ALL, top, None, Progress(done=done, running=running, failed=failed), True, True, None, None, True) if not h: break running.append(h) self.assertEqual(len(running), 12)
def test_all(self): top = make_topology(size=3) done = [] running = [] failed = [] while True: h = find_next_host(Strategy.ALL, top, None, Progress(done=done, running=running, failed=failed), True, True, None, None, False) if not h: break running.append(h) self.assertEqual(len(running), 12)