Cleanup should remove groups too

Change-Id: Iab9a4f4c6a19acf4db7dd531fa14cb2f0193c351
Closes-Bug: 1529855
This commit is contained in:
Proskurin Kirill 2016-01-11 14:37:57 +03:00
parent 3f328b2043
commit f1321192e3
2 changed files with 6 additions and 0 deletions

View File

@ -22,4 +22,5 @@ def cleanup():
with zk_utils.connection() as zk:
zk_utils.clean(zk)
marathon_client.remove_all_apps()
marathon_client.remove_all_groups()
chronos_client.remove_all_jobs()

View File

@ -60,3 +60,8 @@ class Client(marathon.Client):
apps_ids = six.moves.map(operator.itemgetter('id'), self.get_apps())
for app_id in apps_ids:
self.remove_app(app_id, force=True)
def remove_all_groups(self):
group_ids = six.moves.map(operator.itemgetter('id'), self.get_groups())
for group_id in group_ids:
self.remove_group(group_id, force=True)