def test_is_healthy_is_true_when_running_jobs_take_down_host(self): top = make_topology(3, True) state = State(top, None, {}, True, True, progress=Progress(running=set(top.get_down()))) self.assertEqual(state.is_healthy(), True)
def test_healthy_cluster(self): top = make_topology(2, True) down = set(top.get_down()) state = State(top, None, {}, True, True, progress=Progress(running=down)) self.assertEqual(state.is_healthy(), True)
def test_unhealthy_cluster(self): top = make_topology(2, True) state = State(top, None, {}, True, True) self.assertEqual(state.is_healthy(), False)
def test_is_healthy_false(self): top = make_topology(3, True) state = State(top, None, {}, True, True) self.assertEqual(state.is_healthy(), False)