forked from p15670423/monkey
BB: Remove find_monkeys_in_db
This commit is contained in:
parent
a691a16625
commit
73fbc22e3d
|
@ -139,14 +139,6 @@ class MonkeyIslandClient(object):
|
||||||
LOGGER.error("Failed to reset island mode")
|
LOGGER.error("Failed to reset island mode")
|
||||||
assert False
|
assert False
|
||||||
|
|
||||||
def find_monkeys_in_db(self, query):
|
|
||||||
if query is None:
|
|
||||||
raise TypeError
|
|
||||||
response = self.requests.get(
|
|
||||||
MONKEY_TEST_ENDPOINT, MonkeyIslandClient.form_find_query_for_request(query)
|
|
||||||
)
|
|
||||||
return MonkeyIslandClient.get_test_query_results(response)
|
|
||||||
|
|
||||||
def find_telems_in_db(self, query: dict):
|
def find_telems_in_db(self, query: dict):
|
||||||
if query is None:
|
if query is None:
|
||||||
raise TypeError
|
raise TypeError
|
||||||
|
@ -186,5 +178,5 @@ class MonkeyIslandClient(object):
|
||||||
return json.loads(response.content)["results"]
|
return json.loads(response.content)["results"]
|
||||||
|
|
||||||
def is_all_monkeys_dead(self):
|
def is_all_monkeys_dead(self):
|
||||||
query = {"dead": False}
|
agents = self.get_agents()
|
||||||
return len(self.find_monkeys_in_db(query)) == 0
|
return all([a.stop_time is not None for a in agents])
|
||||||
|
|
Loading…
Reference in New Issue